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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does the DoCmd support a ResultCode

Status
Not open for further replies.

lamarw

MIS
Dec 18, 2002
223
US
Hi everyone,
I'm trying to use the DoCmd to pop the printer dialog box which I have successfully done. I want to be able to tell what the results of the Dialog Box was. I've tried using something like:

ResultCode = DoCmd.RunCommand(acCmdPrint) but it isn't working.

Is there any other way to pop the dialog box and get a result code or another way to use the DoCmd as seen above and get a result code?

In the most simplistic use I'd like to know which buton was pushed.

Lamar
 
If you want to control your print reports, you can do something like:

If MsgBox ("Print Report?", vbYesNo) =vbYes Then

DoCmd.OpenReport "myreport", acViewNormal, ,wherecondition:="x=1"
End If

this way you don't need to control the printer dialog directly.
The acViewNormal constant instructs Access to print it directly.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top