Criteria = Contents of Field

B

Bill Barber

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")
 
Top