Open report button which opens the report selected in a combo box. (1 Viewer)

wmphoto

Registered User.
Local time
Today, 01:23
Joined
May 25, 2011
Messages
77
This is my first foray into Macros, using Office 2010.

I have a form which contains a single combo box to select from a list of invoices which invoice I want to open, this is based on the Invoices table of my database. Then a button which I created using the wizard to launch the Invoice report for printing.

However not every invoice uses the same report. I have two reports INV01 and INV02 as there was a point where I updated the layout of my invoice. One of the fields in Invoices specifies whether that invoice was produced using INV01 or INV02 and the queries behind the two reports ensure that for each one, only invoices produced using it can be viewed.

The button launches INV02, but this means that if you select an invoice which was produced using INV01 and click the button, it launches a black version of INV02.

Is there any way to set the button so it launches INV01 if an INV01 selected is selected and INV02 if an INV02 record is selected.
 

Users who are viewing this thread

Top Bottom