Can I do This?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a design grid date field in my query I attempted to pick up the date from
a form by the following:- = [Forms]![frmChooseDates]![txtFrom]

I then constructed a function called dhDateFrom and inserted = dhDateFrom()
in the query design grid but all to no vail. I am aware of the vaguaries of #
and ' but am having no joy at all doing this. Can anyone hep?
 
In the Criteria row of your query, under the date/time field, you should be
able to refer to the text box.

If that's not working correctly:

1. Choose Parameters from the Query menu (in query design.)
In the dialog, enter the full name and data type like this:
[Forms]![frmChooseDates]![txtFrom] Date/Time

2. Set the Format property of the text box on the form to Short Date or
similar.

That should ensure the text box interprets the date correctly, and the query
applies it correctly.
 
Back
Top