• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1015
  • Last Modified:

User input into an Access Report

Hi

Not sure if this is possible:  Access 2003:

I have a Report that derives its info from a Query that asks the user to specify records with the DATE field between 2 dates.  That works fine when I run the Report and I get the correct records in the resulting Report.

Is there a way that the two dates that the user specifies when running the Report can be entered into the Report itself (e.g. like in Word when you have Fillin fields that prompt for user info that is then put into the document at the specified location).

I think I may be asking too much??!!

Thanks, Gail
0
GAILBAKER
Asked:
GAILBAKER
1 Solution
 
peter57rCommented:
Hi GAILBAKER,

In the query that contains the parameter field just add two more columns which are the parameter fields themselves.

Mystart:[Enter start date]

myfinish: [Enter end date]

The bits in [] must be exactly the same as the criteria entries.

These will now be fields in your reports recordsource and you can use them in the report like any other field.

Pete
0
 
kenspencerCommented:
Hi,
Just a tip -- if you have, say, monthly dates, you may want to use a form with a dropdown to select the dates instead of forcing the user to type in the to/from dates every time.  If your dates are actually any day to any day, then the only advantage a form would give is persistence (of the entered dates) from one run to the next.

Ken
0
 
EMCITCommented:
You can pass the date values to your query with a form. Then, on the report, create a text box and in the control source:

"Period - "&Forms!FormName!StartDate&" to "&Forms!FormName!EndDate
0
 
andrewf10Commented:
As mentioned above, having a form is the best way of doing this. I use this method on all my databases and use this calendar to let users choose the dates (also as mentioned above):

http://www.fontstuff.com/access/acctut09.htm

This ensures the date formatting is always correct and means you can easily output the inputted dates in your reports.
0
 
GAILBAKERAuthor Commented:
Thanks Pete, this worked really well.  The other solutions were beyond my amateur capabilities!

Gail
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now