Results 1 to 3 of 3
  1. #1
    ducecoop is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    41

    Multiple filter problem.

    I have a form that on the “OPEN” event does this:
    Private Sub Form_Open(Cancel As Integer)
    Me.Filter = "Inactive = 0"
    Me.FilterOn = True
    End Sub

    To only show records that are active.

    However the form has a few filters on it and when they are used the inactive records show
    Example:
    Private Sub cboCampus_AfterUpdate()
    DoCmd.ShowAllRecords


    Me.Filter = "Campus = '" & cboCampus & "'"
    Me.FilterOn = True
    End Sub

    When I add:
    Me.Filter = "Inactive = 0"
    To the code above it does not work
    What am I missing here

    Tia

    Dave

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    You need to put them together:

    Me.Filter = "Campus = '" & cboCampus & "' AND Inactive = 0"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ducecoop is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    41
    I actually had tried that but had my Quoits wrong.

    Thanks much sir

    dave

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

Similar Threads

  1. Filter for Multiple Queries/Combo Box
    By finance600man in forum Access
    Replies: 3
    Last Post: 08-09-2010, 06:31 AM
  2. Report Filter Problem
    By Imgsolutions in forum Access
    Replies: 2
    Last Post: 07-07-2010, 02:32 PM
  3. Filter form from multiple combo boxes
    By Bird_FAT in forum Programming
    Replies: 6
    Last Post: 05-19-2010, 09:32 AM
  4. Form Filter Causing slight problem
    By cowboy in forum Forms
    Replies: 3
    Last Post: 04-15-2010, 07:32 AM
  5. Replies: 1
    Last Post: 02-03-2010, 08:17 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