Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Suppress Print message (Access xp)

    One of my VBA modules calls a report. In the OnnoData event for the report, I've got a cancel instruction. According to the help file, the OnNo data event happens before the print event.

    If I try to open the report from the switchboard, when there is no data, I get no response. If I call it form the module however, I get a message box up advising me that it is now printing (Can't read it fully as it disappears almost instantly as there is no data to print.

    I'd like to suppress this warning however.

    I've put a set warnings =false in the module, but that doesn't work, (I suspect because the warning is a Windows one). On the other hand it doesn't appear if I simply open the report on its own.

    Any suggestions.

    '************************************************* ******************
    'Run check on any annual cash payments expiring & issue letter
    '************************************************* ******************
    On Error Resume Next
    DoCmd.SetWarnings False
    DoCmd.OpenReport "rptLetAnnualCashRnl", acViewNormal
    DoCmd.SetWarnings True

    Thanks. I tried a search but didn't get anything

    Colin

    ****************************************
    Colin McDonald
    colinmac@blueyonder.co.uk
    ****************************************

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Suppress Print message (Access xp)

    The Access Web has an example of suppressing the "Printing" dialog. It involves a form with a Timer event handler, and several Windows API functions. You can find it at API: Suppress the "Printing" Dialog.

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Suppress Print message (Access xp)

    I didn't; think to check there first. It is one of my "favourites" too, so I should have thought of it.

    Thanks
    ****************************************
    Colin McDonald
    colinmac@blueyonder.co.uk
    ****************************************

Posting Permissions

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