Consulting

Results 1 to 4 of 4

Thread: Search Box in Access Form

  1. #1

    Search Box in Access Form

    I have a Contacts database with families from church and friends & family. I am trying to create a text search box in a form that has 2 subforms on it. The subforms are linked with the FamilyID. I want to create a Search Box on the top of the form that will sort of mimic the Search box on the bottom of the form. Can anyone help with an idea?

    thank you so much for just taking the time
    Marian

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    First of all what version of Access are you using?
    Next, what do you want to actually search for?
    You can easily create a "Find combo" which will search on a the key field on your form.
    Or do you want a multifunction search text field that will work with more than one field on the form?

  3. #3

    Search Box In Access Form

    Thank you so much for responding! I am using Office 2019 (but Access is default to 2016). I would like to be able to search LastName and then FirstName (they are Short Text). Currently I am using that little search box on the bottom of the form but it is a pain. I have tried the Combo but I just get a list of everyone and I still have to hunt for them. I have been trying to create a "search as you type" kind of text box but I really am not that great at the programming yet. I am just learning VBA. As for the database, the Main form is the Family (which consists of the parents), the 1st subform is the Children Subform. It is linked by the FamilyID and each child has their own ChildID.

    I look forward to your reply

    Marian
    Attached Files Attached Files

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Marian, the reason that I suggested a find combo is that all combo boxes have a search as you type facility.
    You have to intiate it by clicking the drop down arrow first.
    Then as you type it jumps down the list. For it to work well the surname should be in alphabetical order.
    You can concatenate the Surname & first name to make it easier to differentiate family members.
    You can also do fast scrolling by dragging the side indicator down as well.
    I can't work with Access 2016, I only have Access 2007.

    I think a search as you type search text field would be a bit ambitious, I haven't tried it myself.
    But a search field that uses the Form's filter property is not too difficult to create, however like all VBA, Syntax is crucial to make it work.

Posting Permissions

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