Results 1 to 6 of 6
  1. #1
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328

    Query criteria tied to letters in Form pulldown

    I am using Access 2007. I have a form that has a query as its source. I would like query criteria for the FleetDescription field to change when a pull down is changed on the form. If the pull down selects “Non”, I would like the query to select records where the FleetDescription field contains the letters “Non” . If pull down does not pick “Non”, then select records where the FleetDescription field does not contain “Non”

    Any help much much appreciated. I just can’t seem to make this happen

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Dynamically build criteria and apply to form or report filter. Review http://allenbrowne.com/ser-62.html
    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
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    Quote Originally Posted by June7 View Post
    Dynamically build criteria and apply to form or report filter. Review http://allenbrowne.com/ser-62.html
    Thanks for quick reply. I have checked the AllenBrowne data before and it is very good. However it doesn't show me how to change the criteria depending on the contents of a field in the form. Because of other functions on the form the query mod would be the most convenient way. Am I trying to do something that isn't possible?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Not sure I understand your comment. Build criteria using field or control name and apply to form Filter property. Allen Browne code is perfectly appropriate.

    Is this "pulldown" an UNBOUND combobox?

    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.

  5. #5
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    Sorry I haven't replied sooner, but have some things going on that take me away from Access. I will go over Allen Browne again and get back to you. Much appreciate your help

  6. #6
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    I went over the Allen Browne example again found it easier to reach my goal with his VBA modified to fit my needs. Thanks very much for quick reply and referring me to try Allen Browne again.

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

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2018, 12:42 PM
  2. DLookup Tied to Form Error
    By Oxygen Potassium in forum Access
    Replies: 13
    Last Post: 10-20-2016, 09:54 AM
  3. Replies: 1
    Last Post: 07-20-2016, 10:01 PM
  4. Replies: 2
    Last Post: 07-02-2015, 02:24 PM
  5. Replies: 1
    Last Post: 09-30-2013, 11:47 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