Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2021
    Posts
    1

    Option Group & Combo box Filter

    Hello all,

    I need some guidance on filtering a subform with an option group and a combo box

    Basically, I want to use an Option Group of months. When I choose what month, it will filter my subform to those month's records and the combo box is used to filter the year.

    I'm still quite new to VBA. Thanks for the help.

    From the screenshot, I'm filtering just from one date in the record.
    Click image for larger version. 

Name:	Example.png 
Views:	16 
Size:	49.0 KB 
ID:	44018





  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    In the query add 2 fields: year([datefld]) and month([dateFld])

    under the criteria put:
    for month: forms!fMyForm!fraMonth
    for year: forms!fMyForm!cboYear

    (since i dont know the name of your form, i used fMyForm)

    then afterUpdate event for both the combo & the fraMonth is: me.requery
    so it can refresh with the new picks.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-27-2018, 11:54 AM
  2. Replies: 2
    Last Post: 02-19-2013, 07:47 AM
  3. Use Option Group to Filter Combo Box Values
    By dgj32784 in forum Programming
    Replies: 2
    Last Post: 06-06-2011, 12:04 PM
  4. Replies: 1
    Last Post: 11-23-2010, 01:30 PM
  5. Combo Box and Option Group Values
    By Desstro in forum Queries
    Replies: 8
    Last Post: 09-06-2010, 11:40 PM

Tags for this Thread

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