Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report from Modal/PopUp Form (2000)

    On a Form with Modal and PopUp properties set to Yes, I have a Command Button to print a report. I would like to be able to preview the report and decide whether I want to print it, save it as a SnapShot or save it as RTF. Is that possible without changing the Form properties? Any help or link to a good source of information is appreciated. Thanks!

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

    Re: Report from Modal/PopUp Form (2000)

    A popup form will always be on top of all non-popup windows, so the report would be displayed behind the popup form. And since the form is modal, the user wouldn't be able to do anything with the report before closing the form.
    I'd set the Popup property of the form to No. The report will then be displayed in front of the form, so that the user can view it, print it etc.

    (In Access 2002 and later, reports also have Modal and Popup properties, but not in Access 2000).

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report from Modal/PopUp Form (2000)

    Thanks, Hans! As usual, your suggestion worked as advertised. Hope you don't mind an additional question. How can I prevent the user from making changes to the report while in Preview? I don't mind the menu and shortcut bars but not the design button. My appreciation in advance. Take care!

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

    Re: Report from Modal/PopUp Form (2000)

    If you really want to prevent users from modifying database objects, the best solutions are

    1) Create an .mde file (Tools | Database Utilities | Create mde file). In an .mde file, users cannot edit forms, reposts and modules. Downside is that you must do all development in the original .mdb file and create a new .mde file each time you want to distribute it.

    2) Apply user-level security. See WendellB's tutorial The Secrets of Security for an introduction and useful links.

    If you don't want to use these, you can make it more a bit more difficult for users to modify the design of objects, but not impossible. You could, for example, create a custom toolbar with only the buttons you want (Print, Close, ...), and set the Toolbar property of the report (in the OTher tab of the Properties window) to the name of the custom toolbar. When the report is opened, the custom toolbar will automatically replace the built-in one.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Report from Modal/PopUp Form (2000)

    Another solution is to make the modal form invisible just before you issue the command to preview the report, then in the Close event of the Report, issue a DoCmd.OpenForm "..yourformname..". Since it is actually already open, it will just pop-up again.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report from Modal/PopUp Form (2000)

    Hans and Mark ... thanks for the assistance. Will attempt to implement your ideas to the best of my (limited) ability. Take care!

Posting Permissions

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