Results 1 to 11 of 11
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Making Search box

    Hi guys,



    I want to make a form that has a search box that search's for keywords. But when looking on YouTube and googling some stuff I was able to find that you are able to pull up records on a table but not the actually form. I want a user to go to a form and lets say wants to look for a information on a form done a month ago and he inserts the test id for example "572-AAA" in the search bar, then I want the actual form to show up so he can look at the form with all the information. I could not find this, can anybody post some links or anything that can help me do this.

    Thanks!

  2. #2
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    I was doing more research and I found out that I want to create a macro linked to a button that will open up a form in read only, then a search box linked to that button that when I search something it will open up to that particular form with all the information. Hope this makes sense. Thanks!

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    See Allen Browne's search form example http://www.allenbrowne.com/ser-62.html

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    What do you mean by "you are able to pull up records on a table but not the actually form."? Do you want to have a form that will display 1 record at a time from a table based on a Search Field? Or do you have multiple forms and based on a selection, you want an actual form to appear with the data on it? If the latter, if not too many forms you could use a tab control on the form (each tab could be a separate form).

  5. #5
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    I want a form with bunch of search boxes, for example search form by id *, or by name, and when you click the button, it will bring up the form with all the data on the form in read only.

  6. #6
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    I want a form with bunch of search boxes, for example search form by id *, or by name, and when you click the button, it will bring up the form with all the data on the form in read only.

  7. #7
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Did you look at the link in Post #3??

  8. #8
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    yes, but it doesn't bring the actual form up in. I want to create a search form with a text box. The label of the text box lets say is "Search by Name," then next to the label you type in the data and then a button that's says search. After clicking the button it brings up the form with the name that you typed in and now you have the form he filled up in "Read" mode so people can view the form rather than editing the data. Thanks I hope this makes sense, I know there is a way to do with macros but not sure how to execute it, help would be appreciated. Thanks!

  9. #9
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Example:

    Table tblUser with UserName, UserAge, UserAddress.

    Form frmUser:
    Create combo box called SearchName that has UserName from tblUser and put at top of form. Add UserAge, UserAddress fields in the detail section of the form
    RecordSource for Form will be tblUser with combo box SearchName as criteria for UserName field.
    In the AfterUpdate property of SearchName, put Me.Requery
    So whenever they select a name from the SearchName, the form will pull up that record.
    To prevent users from Editing data, just Lock each field on the form in the properties window.

  10. #10
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I don't use macros, only VBA.

    It is not hard to have a form pop up with only the text you are searching for.....

    You can also do as Bulzie suggests; have a text box and a button in the form header or a combo box. Have code in the button click event or the combo box after update event that sets a filter on the record source of the form.

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    banpreet,

    Data is stored in tables.
    Forms are a means of displaying data from one or more tables under certain conditions.

    It is not clear to me what you are trying to search, what you are trying to search for and under what conditions.

    Perhaps you could give us a very clear example.

    There is a modified universal search in the repository section of the forum, that will search for a number of text fragments in all fields of all tables --but it isn't clear that that is what you need.

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

Similar Threads

  1. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  2. Replies: 1
    Last Post: 03-26-2015, 11:08 AM
  3. Replies: 3
    Last Post: 02-02-2015, 11:32 AM
  4. Making a Report from a search Query
    By Taximan in forum Access
    Replies: 1
    Last Post: 01-03-2012, 12:15 PM
  5. Making a keyword search
    By timmy in forum Forms
    Replies: 9
    Last Post: 03-14-2011, 02:57 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