Results 1 to 2 of 2
  1. #1
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727

    Changing VBA to do more

    This is the VBA code I have running at the moment:

    Private Sub cmdFilter_Click()

    Me.Filter = "[initials:]='" & Me.txtFilter & "'"
    Me.FilterOn = True


    Me.Requery

    End Sub

    Private Sub cmdUndoFilter_Click()

    Me.FilterOn = False
    Me.Requery

    End Sub

    I would like to change this from filtering only the "initials:" field, to filtering all fields. I would like the user to type in all or partial values. When they click the filter button, whatever was typed into the text box, I want all records with some or all of that value to show and everything else gone. Does anyone know how to do this? I have date, number, and text fields in this database if that matters. Thanks for the help in advance.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

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

Similar Threads

  1. changing recordsource
    By slimjen in forum Forms
    Replies: 1
    Last Post: 05-02-2013, 06:08 AM
  2. Changing row source
    By joacro in forum Access
    Replies: 3
    Last Post: 03-06-2011, 07:35 PM
  3. Changing to SQL server
    By petko in forum Database Design
    Replies: 2
    Last Post: 02-28-2011, 10:06 AM
  4. Changing the default value
    By LabRatz in forum Forms
    Replies: 4
    Last Post: 11-23-2010, 01:42 PM
  5. Changing Query on the Fly
    By pdouglas in forum Programming
    Replies: 0
    Last Post: 06-25-2009, 10:58 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