Results 1 to 4 of 4
  1. #1
    todmac is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    20

    Choosing Criteria based on option Box Value

    Hi All,


    I have a query and I am trying to use an option group as a parameter.

    I have used the formula
    Code:
     =iif(forms![LookupForm].frame12.value = 1, "Vendor", "Manufacturer"
    however I get the same results no matter which way I toggle the buttons (only vendors come up)
    if I change it to
    Code:
     =iif(forms![lookupform].frame12.value = 2, "Manufacturer", "Vendor"
    then I only get the manufactures.

    Any idea what I am doing wrong here?
    Thanks,
    Todd

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What controls are you putting in the frame - radio buttons?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    todmac is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    20
    Sorry. Yes, Radio Buttons.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your expression is missing closing ). Should get an error message. Is that just a typo in the post?

    I never use dynamic parameterized query. I prefer VBA code to set filter of form or report.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Using Option Box to Select Criteria
    By HelpDesk in forum Queries
    Replies: 1
    Last Post: 07-17-2015, 10:41 AM
  2. filter subform based on option selection
    By trevor40 in forum Forms
    Replies: 2
    Last Post: 03-06-2014, 07:07 PM
  3. option groups as criteria for a report
    By cfljanet in forum Access
    Replies: 10
    Last Post: 10-30-2013, 02:49 PM
  4. Replies: 3
    Last Post: 10-25-2011, 11:38 PM
  5. Replies: 1
    Last Post: 11-26-2010, 05:22 AM

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