G
Garret
Hello,
I have a hopefully simple question. This is the SQL statement that I
have presently:
[lstSearch].RowSource = _
"SELECT tblGages.GageNo, tblGages.GageDesc, tblGages.GageType,
tblGages.GageStatus, tblGages.EngDrawNo " & _
"FROM tblGages " & _
"WHERE (((tblGages.GageNo) Like " & "'" & [txtSearch] & "*'" &
")) " & _
"ORDER BY tblGages.GageNo;"
You can see now that I'm limiting the the SQL statement to certain
values in the tblGages.GageNo field with the text box I have on the
form, txtSearch. What I want to do is have a ComboBox on the Form that
contains the name of a few of the Fields, and instead of
tblGages.GageNo, I could replace it with tblGages.(cboSearchBy) or
something (I know that doesn't work, just trying to get my point
across). Or could a variable be substituted in there too, like
tbl.Gages.(strSearchby) - a String.
Many thanks for any help.
I have a hopefully simple question. This is the SQL statement that I
have presently:
[lstSearch].RowSource = _
"SELECT tblGages.GageNo, tblGages.GageDesc, tblGages.GageType,
tblGages.GageStatus, tblGages.EngDrawNo " & _
"FROM tblGages " & _
"WHERE (((tblGages.GageNo) Like " & "'" & [txtSearch] & "*'" &
")) " & _
"ORDER BY tblGages.GageNo;"
You can see now that I'm limiting the the SQL statement to certain
values in the tblGages.GageNo field with the text box I have on the
form, txtSearch. What I want to do is have a ComboBox on the Form that
contains the name of a few of the Fields, and instead of
tblGages.GageNo, I could replace it with tblGages.(cboSearchBy) or
something (I know that doesn't work, just trying to get my point
across). Or could a variable be substituted in there too, like
tbl.Gages.(strSearchby) - a String.
Many thanks for any help.