Results 1 to 2 of 2
  1. #1
    diane802 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    92

    Filter Form Record Based on multiple criteria

    Hi - I have a form that is being used to enter data on individual clients.

    I started a switchboard, which is what I want to use for the users to click through (instead of the access ribbon).

    I already created a button that when clicked, opens a blank form for them to fill out.

    How do i create a button that will have options for a user to type in (or drop down) these separate fields:
    - Last Name


    - First Name
    - ID Number

    Then, show the resulting records that match, and allow the user to select one of the records and open up the respective form.

    I am thinking about this in terms of one record since I also have a command button on the form that opens up a report (printer friendly version of the form) that they would print, and I wouldn't want the user to end up printing multiple records if lets say there are 2 or more clients with the last name Smith.

    Thank you!

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    First of all, do not use blanks in field names. Blanks and special characters in field and control name cause a world of grief with SQL statements.

    Assuming form field name LastName, FirstName & IDNumber build your forms Filter property in SQL without "WHERE " and set the form's FilterOn property to Yes on your button's OnClick event. Your code may be complicated if some of tose fields are not populated.

    Additionally, have LastName, FirstName & IDNumber in a clearly identifiable part of you form - the form header is a good place with your button, so as not to confuse you user(s) that the field might be part of the form's bound controls.

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

Similar Threads

  1. filter form based on combo box
    By lloyddobler in forum Forms
    Replies: 8
    Last Post: 09-10-2009, 07:33 AM
  2. Find existing record with multiple criteria
    By TheWedgie in forum Forms
    Replies: 1
    Last Post: 03-25-2009, 10:24 AM
  3. Replies: 1
    Last Post: 03-01-2009, 09:53 AM
  4. Form Based Query/Filter
    By Micon in forum Access
    Replies: 0
    Last Post: 11-07-2008, 09:25 AM
  5. Open form based on Subform criteria
    By Suzan in forum Programming
    Replies: 0
    Last Post: 04-25-2006, 02:28 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