I have a form I am using as a password screen. What I want is for the user to type in an ID in the txtID field, run SQL to compare txtID to the primary key field of one of my tables, and put any output in a recordset object. I am trying to start with this:
Dim CustObj As Recordset
Set CustObj = dbs.OpenRecordset(dbOpenSnapshot)
DoCmd.RunSQL "SELECT Customer!ID FROM Customer WHERE Customer!ID = Me!txtID"
and then put the SQL result in the CustObj. The only problem is that I can't put the result in CustObj. Can someone give me advice on this, or am I way off base on this?
Thank you,
Steve Geller
Dim CustObj As Recordset
Set CustObj = dbs.OpenRecordset(dbOpenSnapshot)
DoCmd.RunSQL "SELECT Customer!ID FROM Customer WHERE Customer!ID = Me!txtID"
and then put the SQL result in the CustObj. The only problem is that I can't put the result in CustObj. Can someone give me advice on this, or am I way off base on this?
Thank you,
Steve Geller