Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Passing question

Status
Not open for further replies.

Ray1127

Programmer
Feb 22, 2002
231
US
I have a form in a MS Access 2010 Database that has 2 text boxes set up to input start and end dates for a report. The report is based on a series of 2 queries.

1. Preliminary Pulls the data from the various tables and groups and counts those records.
2. Report Source is a crosstab of the results from 1.

After looking at the data I realized that the Preliminary which grouped and counted the records by a date range was pulling duplicate data. Looked at the raw data and realized that a member may qualify to be counted on the report but could have multiple enrollments. So I Modified the Preliminary and took out the counts just making sure I eliminated all dupes. The structure now looks like this.

1. Preliminary: Pulls distinct records from the various tables
2. Intermediate: Groups and counts the Preliminary Records
3. Crosstab: Source for the Report

Query 1 and 2 run fine. Query 3 errors saying the parameter Forms!frm_Reports!txt_enddate doesn't exist. Query 1 is the only query that actually uses the date fields from the form. Why would query 2 work and query 3 not?????

 
No I entered it into the criteria of the first query that's the only place it's used. If I run the first query works perfectly. run the second query again works perfectly run the third query it errors.

I'll add it to the Parameters of the first query and test it. Let you know what happens.

 
Added it to the parameters of the first query and runs perfectly I'll have to remember that. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top