[RESOLVED] Associating a recordset field with a control in a SQL JOIN code
Suppose I have a SQL JOIN code, how can I refer to the recordset fields when I want to associate some controls on the form with this code programmatically? Assume my code is
VB Code:
SELECT orderDetails.orderId,orderDetails.ProductId, orderDetails.UnitPrice, products.ProductName FROm orderDetails INNER JOIN products ON orderDetails.ProductId = products.ProductId
eg
txtName.text = rst!(field) what will the recordset field be?
Thanks
Re: Associating a recordset field with a control in a SQL JOIN code
it would be like
rst!("orderid") or rst!("productid") etc
Re: Associating a recordset field with a control in a SQL JOIN code
ur field name would be the same as u have in ur select list but u dont need to mention table name with field names :)
Re: Associating a recordset field with a control in a SQL JOIN code
Sorry I have to take you back on this. I thought I had this working but I have realised that the controls associated with this recordset are not displaying the required data. What could be the problem? Am using :-
txtPatron.Text = rst!("LastName")