Announcement

Collapse
No announcement yet.

ms-access preview reports

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ms-access preview reports

    slightly off topic here, but ...
    I wrote an Ms-Access (2000 version) database/interface to look inside the Actinic catalog database - to prevent the users tampering, I HIDE ALL the toolbars when I first show the main screen.

    if I log in (as opposed to the normal users) then the application restores all the toolbars for me.

    I log the users in, (username and password) then allow them to choose the reports they want (keeps them out of Actinic !)

    when they click on the report name, I run the following code:
    Code:
    DoCmd.OpenReport rptToRun, acPreview
    and thats when the problem starts.

    The preview shows (absolutely correctly) and is immediately maximised (again as I requested)
    when I close the preview, it shuts down the WHOLE application - rather than JUST the preview

    I've tried all sorts of traps within the events of the report,
    Code:
    docmd.restore
    and so on, and no matter what I try, I can't close the preview and keep the application open.

    I'm almost certain that its because I have removed all toolbars, and the preview thinks its now the main application.

    What I'm trying to do is to have the equivilent of a
    Code:
    MODAL
    print-preview

    so, asking all those Ms-Access experts out there, does any one know how to close print-previews WITHOUT closing down the whole app.

    kev

    #2
    Kevin,

    would a standard - return or perhaps return (true) - at the end of the preview not give control back to the calling window?
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      you've lost me,
      we've got the traditional OnClose and OnDeactivate and OnError
      what form of syntax/trap do I put and where

      Code:
      Private Sub Report_Close()
          DoCmd.Restore
      End Sub
      this is what I currently have, and I've tried a
      Code:
      DoCmd.Close
      and a
      Code:
      DoCmd.Quit
      (this is the nearest equivilent to what you propose), but I've tried all those, and they don't work.

      kev

      Comment

      Working...
      X