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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Criteria Based on Form Data 2

Status
Not open for further replies.

pete1505

MIS
Jan 24, 2005
22
US
Here's an interesting one. I have a crosstab query that uses a query, that uses another query which has a date field with a criteria that states the date must be between the dates the user enters in two text boxes in a form. Problem is, the report I run is based off the original crosstab query I referrenced above and is run when the underlying macros assigned to a button on the same form as the text boxes containing the dates the user enters is pushed. The error I'm getting is that the system cannot find the dates in the text boxes. I think the problem is that the crosstab query that the report is connected to is trying to grab records from the first query which are being determined by the form. This is some sort of messed up loop that won't work. Basically, when I try to link the text boxes for the detail in my report it can't find the date fields because they are linked to a closed form, and by the time the user gets the form open and enters the dates it's too late because the report is not set up right. Any suggestions on how to make this work correctly? Really I need to get dates in through a form that will feed the right records to my crosstab query wich will populate my report. Thanks!
 
Okay, I'm sure you're getting tired of me now! This works great now and the report is working for all dates.....HOWEVER.....I need to get the report to show zero "0" in the column if nothing was completed. Any way to do this if no information is actually being passed through for that facility type by the query? This would make my day!
 
Can't you deal with the 4 sections of the Format property of the control ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top