How to get Filter in Criteria to work

  • Thread starter Thread starter DOYLE60
  • Start date Start date
D

DOYLE60

I built a line of connected queries with a filter in one of the early ones for
a date. For example #12/12/04#. It works just fine. Now I'm building a
Dialog print from that has filters for this date. So I replaced the hard coded
date with the basic SQL code: Forms!NameOfForm!FieldName. The query works just
fine. I tested it and it works.

However, a future query, fails because of the SQL filter.

So if my early query and filter work, why does a future query fail? The future
query works with the hard coded date (#12/12/04#) but not the SQL. Doesn't
make sense. I have been building databases for years and can't understand. I
compacted and repaired too. This is a new database altogether.

Any ideas?

Matt
 
DOYLE60 said:
I built a line of connected queries with a filter in one of the early ones for
a date. For example #12/12/04#. It works just fine. Now I'm building a
Dialog print from that has filters for this date. So I replaced the hard coded
date with the basic SQL code: Forms!NameOfForm!FieldName. The query works just
fine. I tested it and it works.

However, a future query, fails because of the SQL filter.

So if my early query and filter work, why does a future query fail? The future
query works with the hard coded date (#12/12/04#) but not the SQL. Doesn't
make sense. I have been building databases for years and can't understand. I
compacted and repaired too. This is a new database altogether.

Any ideas?

Matt

I am not sure with this , but i have a hunch that when you invoke your
query, the form where the fieldlist (forms!NameOfForm!fieldName) resides is
not the active form.
 
Back
Top