Critiera from an unbound form

E

eileenjess

I am in the process of creating a query from an unbound form. However,
instead of just putting specific values into the unbound fields, I would like
to also input expressions to search for records. For example I would like to
put: BETWEEN #/##/## AND #/##/## for the DOB field. How can I do this?
 
O

Ofer Cohen

To refer to the fields in the form, from the query, try

Where DOB Between Forms![FormName]![StartDateFieldName] And
Forms![MainForm]![EndDateFieldName]
 
M

Marshall Barton

eileenjess said:
I am in the process of creating a query from an unbound form. However,
instead of just putting specific values into the unbound fields, I would like
to also input expressions to search for records. For example I would like to
put: BETWEEN #/##/## AND #/##/## for the DOB field. How can I do this?


Check Help for the BuildCriteria function. This function
allows users to specify the same criteria that you can use
in in the query design window.
 
Top