Passing Data From Text Box Into A Database Query

DAPOOLE

Registered User.
Local time
Today, 20:15
Joined
Jan 14, 2010
Messages
38
How can I go about passing data from a forms text box into a SQL query?

Basically I want the [userdefined] entry in the below SQL to be data entered from a text box:

Code:
strSQL = "SELECT * FROM [userdefined] ;"

Thanks in advance.
 
"SELECT * FROM [" & [userdefined] & "];"

make sure to include either Me.[userdefined] if the code is in the form or use Forms("Yourformname")![userdefined]
 
strSQL = "Select * From " & Me.UserDefined

David
 

Users who are viewing this thread

Back
Top Bottom