Popup form to filter records

  • Thread starter Thread starter Kath via AccessMonster.com
  • Start date Start date
K

Kath via AccessMonster.com

Hello,
I am running reports based on a bill date. The bill dates are not the same
date per month. I would like to have a user click on a cmd button that will
bring a popup form listing the billdates, and when the billdate is selected
call the report. How is this best done?
Thanks,
Kath
 
I am assuming you are filtering your report based on the bill date.
When you select the bill date, you can use one of the events (like On
Double Click) for the bill date field. In the event put
DoCmd.OpenReport "ReportName", acViewPreview, , "BillDate = '" &
Me.BillDate & "'"

This will open the report in Print Preview mode and will filter it by
the Bill Date you select.

Hope that helps!
 
Thanks for the help. If I take this a bit further. I have a form with two
list boxes. On the left are the form Categories, on the right of the form
the listed reports for the selected category. If I want to call the popup
form, and input the Name of the clicked Report as the variable for
"reportname" how would this be best done?
 
Use an event for the list box, like On Double Click. In the event, you
will need to open your form first. Docmd.OpenForm "FormName". You
will need a field on that form already created that will hold the
Report Name (say ReportName). Then when you open the form, assign that
field the name of your report. That looks like this:
Forms!FormNameYouOpened!ReportName = Me.ReportNameFieldOnFirstForm
 
Back
Top