Results 1 to 3 of 3
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Making parameter query ("or) stop after any parameter is satisfied?

    I presently have buttons linked to reports which in turn are linked to queries. Specifically, I have 8 separate buttons to allow folks to search 8 different ways. With the information these folks are going to want, and with me developing a query and button for each, I feel I may end up with literally dozens of buttons.

    I was thinking that I could do an "or" query and once any one of the options is satisfied by the user I would like the report to be generated after they click "OK" instead of it going to the next optional field. Even better, I supposed, would be to have maybe one button with a drop down menu so they could select how they wanted to search. In other words a "Search By..." button that when clicked would present a menu that let them choose, for example, name or address or state, or any by any search fields available to them. Almost like embedding all my buttons into one I guess.

    Can't seem to find the answer in my "Access 2010 Step by Step" manual so once I again am turning to the pros!

    Thank you.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    well your post involves 2 separate things:

    * if you have 1 button per report/query but there is becoming too many buttons; then using a list box or combo box instead means that then you are moving the Open Report Argument from its own button to a different control - possibly exchanging arguments via if/then - - and really it is all about what kind of user experience you want but fundamentally just rearranging how the existing Open Report Arguments are triggered.

    * different from this is the idea of building the query depending on what they want - this is a lot trickier - it is O's link above and you'll find other info online about Query By Form.....In this situation you are dynamically constructing the SQL statement itself. Keep in mind on this that while you can manipulate the criteria of a query dynamically i.e. (red widgets only) - the nature of the report object does not accommodate one adding or eliminating fields themselves. Which is to say the Color field can have criteria applied (i.e. only Red) but the Report cannot dynamically add/remove the Color field itself. So your report layout does not dynamically change.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 05-06-2016, 11:43 AM
  2. Replies: 6
    Last Post: 12-22-2015, 09:49 PM
  3. Replies: 8
    Last Post: 08-13-2015, 11:08 AM
  4. Replies: 1
    Last Post: 07-21-2015, 03:38 PM
  5. "Label" field according to parameter query
    By Ada01 in forum Queries
    Replies: 1
    Last Post: 04-09-2014, 02:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums