using a pop-up for to set date criteria

  • Thread starter Thread starter coolriversally
  • Start date Start date
C

coolriversally

Guest
Been using Access for quite a long time and I am completely mystified by this one. Think the brain just isn't working it out.

I have between 20-30 really complex reports with multiple linked queries for data sources. Since I have multiple users using the database to run reports on the fly, I need them to be able to set date criteria using a pop up form. I'm familiar with how to create a pop-up form using the filter property that dynamically changes the data as the criteria selection changes for ONE report. How can I utilize the same simple pop-up form (two fields - beg. date and end date) for ALL the reports and as users change the beginning and ending date, refresh the data....using a command button...whatever.

Please help. THANKS!
 
Not sure if you're doing the same thing, but I use OpenArgs in this situation. The button the users clicks to run the report opens the criteria form and passes it the requested report in OpenArgs. When the user finishes entering criteria, a button on the criteria form opens the appropriate report based on that.
 
Using a pop-up form to set report criteria

Can you elaborate a little more for me?
 
Could you base the reports on a query, then in the criteria of whatever field you want, reference the form e.g.

=[Forms].[frmReportsMenu]![Field1]

As long as your running the report from this form it should work.
 
The relevant code - first button:

DoCmd.OpenForm "CriteriaFormName", , , , , , "ReportName"

Behind criteria form button:

DoCmd.OpenReport OpenArgs, acViewPreview
 
I'm sorry all...I appreciate your suggestions...I guess ultimately I'm not explaining myself very well...

I've attached a screen shot for better reference.

Like I said, I have 20-30 reports each linked to a query or series of them, select, crosstab or a combination. I am filtering the data using the pop-up form to collect a beginning and ending date.

The form opens on Start Up (when the main Switchboard opens) and remains open as long as the database is open. There is a Report switchboard then that contains all of the command buttons for each of the reports. When a report is opened it inherits the default beginning and ending dates on the form. Should the user require another date range however, the report needs to be closed and then reopened (this is too complicated for my users), as opposed to being able to refresh the data. (Don't be confused by the Refresh button, it orignally was linked to only one report....) I'd like that button to refresh the active report when the dates are being changed.

Does that make more sense?

THANKS!
 

Attachments

Just took a look at your screen shot and thought I would respond. Sorry so late.

Your report is displayed for the moment in time you run the report. You can't change that. You will have to close the report and re-run to get new data.

I would suggest using a continous form to display these records rather than a report. Your "filter" form would stay the same and you could use the "REFRESH" button to requery the form. You would have to use a "PRINT" button on the continous form to get a paper copy.
 

Users who are viewing this thread

Back
Top Bottom