|
-
Aug 2nd, 1999, 03:22 PM
#1
Thread Starter
Addicted Member
Thanks for your help with the last question ScottF.
I have a new problem now - I want to populate my 'recordsource' at runtime with a select statement. I have a Customer Id in strCustID and am doing the following.
strSource = "select * from Contacts where [Customer ID] = strCustID"
Then I'm putting strSource into the recordsource of my data control
I've got something wrong here but am not sure what as my control is not pointing to the correct Cust Id, but it is correct in strCustID. Can anyone help? Thanks.
-
Aug 2nd, 1999, 04:43 PM
#2
According to naming convention your variable strCustID is a string, then change you SQL statement to:
strSource = "Select * From Contacts Where[Customer ID] = '" & strCustID & "'"
If strCustID is a numeric type then change you SQL statement to:
strSource = "Select * From Contacts Where[Customer ID] = " & strCustID
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
[This message has been edited by Serge (edited 08-03-1999).]
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
|