Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Southern California
    Posts
    13

    Unanswered: Prompt user for report filter criteria

    I have a registration database for 15 training events in 15 different cities. All the registered attendees are listed in one table, with a field indicating which city they are attending.

    I have a registration report that I need to be able to pull up for any city, but I don't want to save 15 versions of the report. Can I make the report prompt the user for a city name as it opens, and then apply a filter to the data, so that the report shows only attendees from that city?

    Maybe it's not a filter. Maybe it's a criteria in the underlying query. Either way, how can I make this work?

    Thanks,
    Julie

  2. #2
    Join Date
    Feb 2004
    Location
    CT,USA
    Posts
    250
    Why not use a radio control that has each city, that the user selects prior to showing the report? Are you sure your users will know/want to type City names without errors?

    In any case you will need to use some VB code to get it in the right location? Are you comfortable with that?

  3. #3
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Sample Reports

    Hello,

    I'm attaching a sample of how I've accomplished what you're asking.

    Basically, the steps are:

    1. Create a form to select criteria (I use unbound combo boxes to avoid the typo problem that poliarci mentioned)

    2. Create the report you want with the combo box(es) as criteria (in your case, CITY)

    The criteria should be be something like:

    Like nz([Forms]![frmReportChooser]![yourcombo],"*")

    If the user leaves this blank, they will get "All". Note, this will only work for text values.

    This may not be the best/most efficient way to accomplish what you're asking, but my users seem to like it and it works.

    Check out frmReportChooser, qselReportChooser, and rptInventoryFiltered in the attached sample. (Sample in Acc2000)

    Let me know if you have questions.

    HTH,

    Chris
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2004
    Location
    Southern California
    Posts
    13

    Thanks

    Thanks Chris,
    I haven't had time to try it yet, but I'm pretty sure that's exactly what I needed. The sample database is great, and it really helped me understand what you did.
    -Julie

  5. #5
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    Great, glad it helped.

Posting Permissions

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