Recordset

marrett

Registered User.
Local time
Today, 10:55
Joined
Sep 8, 2000
Messages
43
Hi
I Need to get the following statement to work.


Set RST = db.OpenRecordset("Select * From [users]where [user]=" & Forms!usersignin!User)

User in users is text. Please help.
 
For string criteria you need to put the data in single quotes. Try:

Set RST = db.OpenRecordset("Select * From [users]where [user]= '" & Forms!usersignin!User & "'")

Hope this works,
Paul
 
Thanks Paul,

I Still cannot get it to work.

I used your s and I get the error> Method 'Item' of Object 'Forms' Failed

Set RST = db.OpenRecordset("Select * From [users]where [user]= '" & Forms!usersignin!User & "'")

Please help.

Thnaks,

Maria
 
Is this as simple as

Set RST = db.OpenRecordset("Select * From [users]where [user]= '" & Forms!usersignin!User.Value & "'")

??? or caption ???

Art
 
In all the examples no-one has placed a space before "WHERE" to separate it from the recordsource [users].
 

Users who are viewing this thread

Back
Top Bottom