Results 1 to 2 of 2
  1. #1
    bakkouz is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    25

    Filter a form based on a date selected from a combo box


    Hey guys,
    I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.


    the code is:


    -----
    Sub SetFilter()


    Dim LSQL As String

    LSQL = "select * from Preventive_Q_View"
    LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"

    Form_Preventive_View.RecordSource = LSQL

    End Sub


    ----


    How do I modify this code to work with the date combo box?


    also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?


    Thanks a lot.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

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

Similar Threads

  1. Filter Contacts based on Selected Customer
    By davecumber in forum Forms
    Replies: 7
    Last Post: 07-25-2013, 06:17 AM
  2. Replies: 5
    Last Post: 01-16-2013, 11:51 AM
  3. Filter form records by Date with Combo box
    By jhrBanker in forum Forms
    Replies: 2
    Last Post: 07-31-2012, 01:19 PM
  4. Replies: 8
    Last Post: 06-04-2012, 07:20 AM
  5. filter form based on combo box
    By lloyddobler in forum Forms
    Replies: 8
    Last Post: 09-10-2009, 07:33 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