Criteria = Contents of Field

G

Guest

I have a Text Box on a form that I have to change to represent a code. If a
"Z" is entered in the Text Box I want the Query to look in TypeField (Record)
for several Types. When I compare to the code on the form I then move "Y01
or Y02 or Y03 or Y07" to the Text Box.

I cannot figure out the syntax for the Query to display types Y01 or Y02 or
Y03 or Y07 from the contents of the Text Box.

I presently have the Criteria as "Forms!TestForm! '" & =[Me.TextBox] & "'"

Any help is appreciated

Bill
 
M

[MVP] S.Clark

The syntax probably should not be in quotes. Variables can be used in this
fashion:

Forms("FormName").Controls("Controlname").Properties("PropertyName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top