Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select printer for a report launched from command button

Status
Not open for further replies.

dianemarie

Instructor
Jul 11, 2001
583
US
Hello, I have a database that has a startup menu with command buttons for previewing reports. Once the user gets the report in print preview, they print it. If the report is pointing to a printer that the user doesn't have installed on their machine, they get this error message (I'm guessing it's the problem at least): "There was a problem retrieving printer information for this object. The object may have been sent to a printer that is unavailable." How do I set up the report so that it prompts the user to select a printer, so they don't get this error message? Thank you for any help.
 
I make my own toolbars that I attach to every report (with the Toolbar property). Try putting this in your code. On them I have Send, Save, Print, Close.

When the user hits the PRINT button on the toolbar, it runs a macro which calls this code:

Code:
Function OpenPrintDialogue()
    On Error Resume Next
    DoCmd.DoMenuItem acFormBar, acFile, 6
End Function
It opens the Print Dialog box.

Hope this helps.



Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top