Results 1 to 8 of 8
  1. #1
    scottm0690 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    7

    Create a Search that will return results in a form

    I am working on creating a Access Database that when a user wants to search for a record based on Name, it will return all results and then allow the user to click on that table item that they are looking for and it opens the form with all the info from the table. Thank you!!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    make a form that shows all records,
    put an unbound text box in the header to enter the name,
    when user presses enter, the list filters for that name :

    Afterupdate event

    Code:
    sub txtBox_Afterupdate()
    If IsNull(txtBox) Then
      Me.FilterOn = False
    Else
      Me.Filter = "[LastName]='" & txtBox & "'"
      Me.FilterOn = True
    End If
    END SUB

  3. #3
    scottm0690 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    7
    Sorry to ask this next question, when creating a form and doing the search, do I need to create some relationship that will allow that search to fill the form fields with the table contents of the search? if that makes sense? Basically I have a form that will be filled out with check boxes and other info, then I want to use your search to find a record that will populate the form with that record search info. Thanks, sorry for the question as I am new to this and appreciate your help. If you know a good place to go that I can learn how to do this, that would be great also. thanks,

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    ranman has provided the essence of the required logic. If that hasn't answered your post, then perhaps you could provide more details or a mock up of what you are trying to do. It is difficult for readers to offer more focused advice when there is only a general statement/concept in the question/post.
    This forum is a good place to start --just tell us more about you, your environment and a description (the big picture) in simple English.
    Good luck.

  5. #5
    scottm0690 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    7
    Basically what I am trying to do is create a form that has checklist items that are related to a project. When a user creates a new project they will check off what items they will deliver, once they add their project name, number, and all items they want to check off, it will save fine to the table. I want to be able to do a search for a project number or name, that will pull up that project record and all the items they have checked off to deliver in either the current form used for creating or a new form. I hope this helps. I apologize for not giving more info and if this seems basic, I do appreciate any help you can give. thanks,

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    If you know a good place to go that I can learn how to do this
    Poke around at Allen Browne's site. Here's 2 things that might help, but it sounds like you're not up to speed on the very basic basics of form design. You might be diving without taking swimming lessons first, if you get my drift.

    http://allenbrowne.com/ser-62.html
    http://allenbrowne.com/AppFindAsUType.html
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  8. #8
    scottm0690 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    7
    I will definitely look. Yes, I understand, run before walking not always a good thing. Thanks,

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

Similar Threads

  1. Replies: 2
    Last Post: 08-21-2017, 10:48 AM
  2. Replies: 2
    Last Post: 07-19-2014, 01:58 PM
  3. Replies: 5
    Last Post: 09-30-2013, 05:44 PM
  4. Replies: 7
    Last Post: 09-21-2012, 03:30 PM
  5. Return results based on a partial search
    By TimMoffy in forum Queries
    Replies: 2
    Last Post: 07-27-2012, 11:09 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