Results 1 to 3 of 3
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Filtering Records

    I do have a Form which displays the list of all the employees.


    I want to set an unbound combo box having field values of F & M
    On selecting the M, the list should display Male employees & vice versa.

    Regards
    Alex

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    put this code in the after update event to filter the gender....


    Code:
    '----------------
    sub cboSex_AFTERUPDATE()
    '----------------
    If IsNUll(cboSex) Then
      Me.FilterOn = False
    Else
      Me.Filter = "[Sex]='" & cboSex & "'"
      Me.FilterOn = True
    End If
    end sub

  3. #3
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192
    Thanks Ranman.
    Your solution Worked.
    Alex

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

Similar Threads

  1. Replies: 21
    Last Post: 03-14-2016, 01:33 PM
  2. Filtering records to display on Label
    By drunkenneo in forum Modules
    Replies: 2
    Last Post: 04-01-2014, 02:09 AM
  3. Filtering Master Records and Subform Child Records
    By Nerther in forum Programming
    Replies: 6
    Last Post: 10-01-2013, 05:24 PM
  4. Filtering Records Question
    By manic in forum Programming
    Replies: 5
    Last Post: 04-03-2012, 08:48 AM
  5. Filtering records with a combo box
    By joesmithjunior in forum Access
    Replies: 1
    Last Post: 12-18-2011, 03:17 PM

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