|
-
Jul 10th, 2006, 05:47 AM
#1
Thread Starter
Hyperactive Member
[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
-
Jul 10th, 2006, 05:49 AM
#2
Hyperactive Member
Re: Associating a recordset field with a control in a SQL JOIN code
it would be like
rst!("orderid") or rst!("productid") etc
-
Jul 10th, 2006, 05:50 AM
#3
Hyperactive Member
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
-
Jul 11th, 2006, 12:43 AM
#4
Thread Starter
Hyperactive Member
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")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|