Results 1 to 2 of 2
  1. #1
    kulanga is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Posts
    7

    Printing problem

    Hi I am a newbie to Access and VB Programming.



    I am working on a button to print a report. I included the Msgbox function so when the user clicks on the button a dialog box appears with Yes and No buttons.
    The Macro is as follows:

    The first action is Cancel Event with the condition " MsgBox("Do you want to print the report?",4)=7 "
    Then the next action is the PrintOut with the condition "6" to print when Cancel Event action is false.
    But when I click on the No button report prints as well.

    What should I change in the condition of the PrintOut action?

    Thank You

    Kulanga.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    You need to put it in to an If statement. Like this:

    If MsgBox("Do you want to print the report?",4)=7 then
    Code here for this response
    Else
    Code here for other response
    End if

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Printing Form
    By linjoye in forum Reports
    Replies: 1
    Last Post: 02-19-2010, 08:09 PM
  2. Report Printing
    By newtoAccess in forum Reports
    Replies: 5
    Last Post: 12-02-2009, 07:46 PM
  3. Non-Printing Buttons?
    By Karend440 in forum Access
    Replies: 5
    Last Post: 11-30-2009, 08:03 AM
  4. Printing problem
    By lornadobson in forum Reports
    Replies: 2
    Last Post: 09-29-2009, 05:28 AM
  5. Help with my printing
    By mattwill2001 in forum Queries
    Replies: 4
    Last Post: 08-17-2009, 01:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums