-
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.
-
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).]