Selective Printing

Dr_Worm

Board Regular
Joined
Jul 28, 2003
Messages
103
I have a form with a combo box linked to a field called Status. If I select the first option "Requires Approval" and click the print button it will print out an approval sheet. But if I select one of the other options it prints out a blank form (Report).

The report is based on a query with the criteria from the combo box.

What I want to do is make it so that nothing is printed at all if anything other that "Requires Approval" is selected in the combo box.

I'm sure it's a very simple peice of code.

Thanks :p
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Two methods, the first is to use the "NoData Event" of the report to cancel it.
The second would be to add an if statement to the code behind the Print button and check the value of the combobox before printing.

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,566
Messages
6,160,525
Members
451,655
Latest member
rugubara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top