Creating query based on a textbox

xWouterx

New member
Local time
Today, 13:23
Joined
Aug 14, 2007
Messages
7
Hello

I'd like to create a query like this:

select table.column, table.column, table.column
from table
where table.column = textboxvalue

How can I do this?
 
If the SQl is a stored query then the text box has to be on an opened form and you refer to it Forms!YourFormName!YourTextBoxName

If you are creating an SQL statement in code then you need to substitute the value instead.

i.e. where tblname.Column = '" & me!YourtextBoxName & "'"

notice the single quotes assuming the Column is Text. If the Column is Numeric then you can omit the single quote.
 
If the SQl is a stored query then the text box has to be on an opened form and you refer to it Forms!YourFormName!YourTextBoxName

If you are creating an SQL statement in code then you need to substitute the value instead.

i.e. where tblname.Column = '" & me!YourtextBoxName & "'"

notice the single quotes assuming the Column is Text. If the Column is Numeric then you can omit the single quote.
Thanks, but already figured it out, that's why I canceled my post, but seems like it still came through hehe.
But still thanks for the little extra :-)
 

Users who are viewing this thread

Back
Top Bottom