Check that:
1) Your criteria is typed correctly and includes an equal
sign, for example:
= [Forms]![Customers]![CustomerID]
2) Your criteria refers to the name of the form *control*,
not the name of the field that it's based on. E.g., by
default, Access names unbound textboxes Text0, Text1,
etc. Check the Name property of each control.
3) Your form is open and contains data when you execute
the query.
4) The criteria are typed in the appropriate matching
fields in your query grid.
5) Try temporarily replacing your cell reference (cut it
to the Clipboard first, so you don't have to retype it)
with a string literal, that is, whatever you'd typed in
the form control, to verify there are actually records
matching this criteria in your table.
6) Multiple criteria entered on the same line in the query
grid are treated as a logical AND. So if you entered "PA"
in a State form control, and "1234" in a Customer Number
control, the query will only return records that match
*both* criteria. It is possible to build a criteria form
that can contain user-selected OR and AND logic for
multiple criteria, but it will require additional
programming.
Keep plugging. You've got to climb the mountain if you
want to enjoy the view...
HTH
Kevin Sprinkel
-----Original Message-----
Thank you for the help. The issue I am having now is that
as soon as I add [Forms]![frmMy Form]![txtMy Textbox]
The query stops bringing back any data.
-----Original Message-----
Kevin is correct, you probably don't want bound controls on the form for
this. To refer to the control, open the query in design view. In the query
design grid, refer to the control on the form as previously mentioned,
adjusting for the actual names of your form and controls. The line referring
to the form should be placed in the criteria line of the query grid under
the field that the control is supposed to filter. If there are any spaces or
reserved words in the names of the form or controls you'll have to wrap them
in brackets. Once you have it correct, Access will probably wrap the
remainder in brackets, so you can just do it to begin with, if you like.
Example:
[Forms]![frmMy Form]![txtMy Textbox]
--
Wayne Morgan
MS Access MVP
I am placing them on the form. How do you make the fields
bound?
.
.