Two Queries: Two date parameters - One Report

pbaldy said:
Well, there's no data in the sample you posted, so for me the query runs without prompting, but returns no records (as you'd expect).

View attachment propprjt.zip

Here's one with data. I can't believe I got a complicated macro to work but this I have trouble with!

D
 
I suspect you want this as a criteria:

Between [Forms]![Criteria].[Text0] And [Forms]![Criteria]![Text2]

As it was, it had to be exactly on the first date. That pulls records. Now I'm off to play racquetball!
 
Thank you. I'll try that! have Fun!
 
OK, I'm not kidding. It didn't work, then it did, now it doesn't again! I'll keep plugging along.......
 
pbaldy said:
No, as it won't know what txtStartDate is. You need the "Forms!..." bit to tell it to look on a form by that name for a control of that name.

That's what I was getting at. I have a form with unbound begin and end text boxes that pull those two dates, then let's the query run with them. It seems to me that his query should work the same way as long as the form gets fed those two dates first.
 
I looked at the query and think this might work ...

Where (Project Table.date Between Forms!Criteria!txt0 And Forms!Criteria!txt2)
 
Wiz47 said:
I looked at the query and think this might work ...

Where (Project Table.date Between Forms!Criteria!txt0 And Forms!Criteria!txt2)

Sorry ... change that to text0 and text2
 
I got it to work ... run the criteria form
 

Attachments

Users who are viewing this thread

Back
Top Bottom