Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    48

    Unanswered: "Parameter" form used with reports

    I'm using a list box to open reports. One of the reports has 3 parameters that the user has to enter. Rather than having them type in the information, I'm using a form that has 2 combo boxes for the user to make their selections for 2 of the parameters. After the user enters the parameters, he/she clicks OK and the report comes up.This arrangement seems to work very well. The problem I'm having is when the user tries to cancel or close the form because they don't want to continue the process for some reason. The form will close but the parameters from the underlying query for the report pop up. I believe the close or cancel button on the form is in conflict with the instructions in the reports list box to open up the report.

    I need to know how to close the "parameter" form without having the underlying query pop up.

    Any suggestions? Need more information?

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    I try to avoid Parameters in the query for reasons like this; they may work for a typical usage, but they're hard to control for anything else (like when the user wants to cancel).

    I don't know how good your VB skills are, but I would instead suggest you use InputBoxes to prompt the user (then you can cancel the code easily if needed), then build the query in VB and then run it.
    Me.Geek = True

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    If they hit cancel the report just shouldn't be opened. Then the parameter boxes won't appear.

    Also, don't close your custom dialog box before opening the report. Simply add a Me.Visible = False to the line before opening the report.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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