different take on the date range question

mech55

Registered User.
Local time
Today, 01:08
Joined
Aug 26, 2005
Messages
61
For example, my report asks the user to enter a date range by poping up two boxes first one asks enter start and second asks enter end date
like below

Between [type the beginning date:] And [type the ending date:]

Is there any way to extract what the user types in for that and put it on a header in the report. So if they typed 8/29/05 and then 8/31/05, I want it to say 8/29/05 thru 8/31/05 on the report. Not just the last date which is how my query is sorted for duplication reasons.

thanks,
 
Add a text box with a control source of:

=[start date]) & " to " & [end date]

Hay
 
That works but, now I have two sets of text boxes asking the same thing. I need to eliminate one...
 
It's generally considered better practice to pass query parameters via a form, you can then simply reference these textboxes on your Report
 
so in the Query I would put something like

Forms![Day/Week/Month Form]![Combo15]

if I wanted to use the combo box in the form for the criteria?
 
As everyone has helped me here is my effort...

Create a form with two unbound objects or combo box... name one StartDate and the other EndDate.

Create a query with the criteria something along the lines of...
Between [Forms]![Name of form]![StartDate] And [Forms]![Name of form]![EndDate]

Then create a report based upon this information.

Next create a macro on your form to preview this report and hence you do away with the two parameters for start date and end date.

Andy
 
kirky007 said:
Next create a macro on your form to preview this report and hence you do away with the two parameters for start date and end date.

Andy
Do away with macros and use VBA before you get to far into Access, they're not recommended
 
Thanks a lot, it works perfectly...

As far as macros, I know vb.net well but not vb6 so going backwards is annoying.
 

Users who are viewing this thread

Back
Top Bottom