Query

D

Deborah Rylands

I am trying to query using a "where" criteria. I want
data from a table only if the field is equal to a field
on the form. Is this possible? Eg. When the "size"
field in the table is equal to the "size" field on the
form, I want it to bring back the last value.
 
J

John Vinson

I am trying to query using a "where" criteria. I want
data from a table only if the field is equal to a field
on the form. Is this possible? Eg. When the "size"
field in the table is equal to the "size" field on the
form, I want it to bring back the last value.

Create a Query based on the table. On the criteria line under [Size]
put

=[Forms]![NameOfYourForm]![txtSize]

where txtSize is the textbox you're using as a criterion.

Note that this must be an UNBOUND textbox - its Control Source should
be blank; otherwise you'll change the value in the currently selected
record on your table in the process of entering the criterion!
 

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