date string from form to query's criteria

R

Rafi

Hi,
I have 2 fields: FROM and To as dates in form.
Another text field LDATE, is for string that filters by dates beg. FROM and
end. TO .
What should be this string (it's exact syntax) in order to be able to pass
it to Query's field called LOADDATE, so the report based on this query
can be filtered accordingly.
I tried atleast a dozen of solutions,- but perhaps one of you can offer
different approach that works....

Thanks
 
N

NuBie via AccessMonster.com

you don't need the other text field. your query should look like this.

SELECT YourTable.Field, YourTable.DateFrom, YourTable.DateTo
FROM YourTable
WHERE YourTable.DateFrom >= Form!FromDate
AND YourTable.DateTo <= Form!ToDate;
 
Top