using form data in a query

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

I have a query that shows records by dates on my form.
This query prompts for the date when I open the form. I
want the query to obtain the date from the form as it
opens and not prompt me. The form opens and todays date
is obtained in "on Load". I have tried to use this date
name in the query but it does not work...still prompts
me...what am I missing?
 
You can't use a modules variable in the query. The query can refer to a
control on the form, but if that control is on the form that the query is
supplying records to, it may be too late. If all you want is to limit the
query to today's date, then you can do that in the query itself. Set the
criteria for the Date field to:

=Date()
 
Back
Top