Results 1 to 2 of 2

Add double message boxes

This is a discussion on Add double message boxes within the Microsoft Access forums, part of the Question Forums category; Can I have a message box come up and ask do you want to print now. If yes print report ...

  1. #1
    Board Regular daniels012's Avatar
    Join Date
    Jan 2005
    Location
    34 56' 19" N / 82 13' 38" W
    Posts
    5,162

    Default Add double message boxes

    Can I have a message box come up and ask do you want to print now.
    If yes print report "RptWorkOrder" if no CANCEL PRINT

    If it is Yes then print the form and I want another message box to appear. I want it to say "Enter white paper in printer then hit OK" When they hit OK it would then print.

    Can anyone help me with code I can attach to a print button.

    Thank You very much,
    Michael
    "It is so nice, to see so many, that know so much"

    Using Excel 2007

  2. #2
    Board Regular
    Join Date
    Aug 2008
    Location
    Kerala, India
    Posts
    166

    Default Re: Add double message boxes

    I hope this will help.

    Code:
    Private Sub cmdPrint_Click()
    If MsgBox("Do You want to Print the Report...?", vbYesNo + vbDefaultButton2 + vbQuestion, "Print Report") = vbYes Then
         MsgBox "Load White Paper on Printer and Hit OK"
            DoCmd.OpenReport "myReport", acViewPreview
    End If
    
    End Sub
    www.MsAccessTips.com (Learn MS-Access Tips and Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com