Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    2

    Unanswered: Help me with Finding Records

    Hi all,

    I have a table with a text field "Particulars".

    I want to create a search form which will take input from the user and search the 'Particulars' field and list the records matching 'any part of the fields'.

    Can anybody guide me please?
    Thanks in advance

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Have a Pop-up form (i.e. called SearchForm or whatever) or even on your data entry form, then put in a dropdown box (i.e. called: FParticulars) which has as the rowsource all the unique values of Particulars (I usually make search fields like this a light yellow background). Then on the AfterUpdate event of this field, you can do several different things depending on what you want to do. Your underlying query (for your form or query return or report, etc.) will have in the criteria row for the field Particulars something like = Forms!SearchForm!FParticulars & *. The & * will give you a result where the user can enter in just the first part of the wording. If it's "any part" you'd use = * & Forms!SearchForm!FParticulars & *. You also don't need to use a dropdown box, it could also be a text box, etc. and you can have a "search" button versus using the AfterUpdate event of the field.

    You can get pretty creative (i.e have another pop-up box with a listbox where the rowsource = the query mentioned above or you can open up your data entry form and set the recordsource = to the query above.) Depends on what you want to do with the type of search box after the user enters in the search criteria.
    Last edited by pkstormy; 09-16-06 at 21:51.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Search box

    The attached reporting example might give you some ideas as the concept is pretty much the same.
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •