S
shane
I'm having difficulities getting query results to show in a text box.
Explanation:
form "main" has the text boxes "sdate", "edate", and "total"
query "complainttotal" is a totals query where date is grouped by where, and
another column "date" is grouped by count. Criteria for date is between
"forms!main!sdate and forms!main!edate".
Running the query on its own returs the correct value.
The text box "total" has the "complainttotal" query has is record source.
The form is bound to query "complainttotal".
Opening the form the text box "total" displays 0. Again running the query
from the database window displays the correct value.
I suspect the dates on the form being part of the criteria may be a problem?
The dates are generated by a default value where "sdate" is
"=CVDate(Format(Date(),"m/yyyy"))" and "edate" is
"=CVDate(Format(Date(),"m/yyyy"))-1". Does the query try to run before the
date is loaded?
Explanation:
form "main" has the text boxes "sdate", "edate", and "total"
query "complainttotal" is a totals query where date is grouped by where, and
another column "date" is grouped by count. Criteria for date is between
"forms!main!sdate and forms!main!edate".
Running the query on its own returs the correct value.
The text box "total" has the "complainttotal" query has is record source.
The form is bound to query "complainttotal".
Opening the form the text box "total" displays 0. Again running the query
from the database window displays the correct value.
I suspect the dates on the form being part of the criteria may be a problem?
The dates are generated by a default value where "sdate" is
"=CVDate(Format(Date(),"m/yyyy"))" and "edate" is
"=CVDate(Format(Date(),"m/yyyy"))-1". Does the query try to run before the
date is loaded?