Question : I want to be able to Print & Close my report by pressing enter

I wanted to be able to Print a report that is opened by my forms when I press "Enter" Key and then immediately closes the report afterward. How could I accomplish this?

Thanks for the help

Answer : I want to be able to Print & Close my report by pressing enter

Always state what version of Access you are using.

Report Mode?
Do you mean this is Access 2007, and the report is open in "Report *View*"?


Using the "Enter" key to do anything in Report View would have to over-ride the Default functionality that will move you through the Reports controls.

What is commonly done in Report View is that a "Print" button is added to the Report.
Then set the "Display When" property of this button to: "Screen Only" so it only appears in Report View (Not in Print Preview or in the actual Hardcopy Printout.)

The code on the Click Event of this button will simply be:

        DoCmd.PrintOut acPrintAll
        Docmd.Close

Here is a sample.

;-)

JeffCoachman

 
Random Solutions  
 
programming4us programming4us