Results 1 to 8 of 8
  1. #1
    jlclark4 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Dec 2010
    Location
    North Carolina
    Posts
    155

    Creating a search function

    I am trying to be able to search by a person (which this person has multiple entries) and it brings up a list of all the entries dealing with that person. I assume this needs relationships built between the list of names and the main table correct? Also, how do I get this to work? I have the initial window set up where you either click add new record or search records. I would like the search records to be different then the form that comes up with new record. Someone types in for example my name: Jennifer; and all the records that I have entered pop up in a box below. Then they can select which record they want to work on ... click, and the form that normally would open (the one with all the data in it) pops up for that corresponding entry... how can I do this? If I can get some hints, I should be able to figure it out...

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    i found the attached on my hard drive, and it might be able to help you out. I think the code probably does what you're trying to do...or close.

  3. #3
    jlclark4 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Dec 2010
    Location
    North Carolina
    Posts
    155
    Yes, that example does help. But, how can I get the information into a datatable instead of a form (the sub information) and be able to access the main form they are pulled from by clicking on a record. Could I in turn keep what you have but add a button thats like view this record and it will open up the entire record in a new window?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by jlclark4 View Post
    Yes, that example does help. But, how can I get the information into a datatable instead of a form (the sub information) and be able to access the main form they are pulled from by clicking on a record. Could I in turn keep what you have but add a button thats like view this record and it will open up the entire record in a new window?
    one of the buttons on that sample opens a new form window with only the clicked record, Jennifer. Did you see that?

  5. #5
    jlclark4 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Dec 2010
    Location
    North Carolina
    Posts
    155
    Yes, I played with it some. It had "open new form" as its label and it threw me off. Thanks for the help!

  6. #6
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    no problem.

    pls mark the thread solved via 'thread tools' if it is ok?

  7. #7
    Ashe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Location
    Blacksburg VA
    Posts
    65
    I have a follow-up question to this: How could it be programed to clear itself? For instance, a user has searched the records for "person2" and now all the orders associated with person2 are displayed. I would like to put a button on a similar form that refreshes the form to have no records displayed and all combo boxes clear. I already have the combobox=null settled, I just need to figure out how to remove the previously called orders from view.

    Thanks!

  8. #8
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Ashe View Post
    I have a follow-up question to this: How could it be programed to clear itself? For instance, a user has searched the records for "person2" and now all the orders associated with person2 are displayed. I would like to put a button on a similar form that refreshes the form to have no records displayed and all combo boxes clear. I already have the combobox=null settled, I just need to figure out how to remove the previously called orders from view.

    Thanks!
    In my sample, for instance, all you would have to do is call the form_load() function:
    Code:
    Call Form_Load
    behind the button.

    The code is already written behind that event. Basically, it shuts the filter off and hides the subform. Technically, it does not clear the subform, as it can't be cleared because of its recordsource.

    if you have more questions, start a new thread. This one is already closed. thanks!

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

Similar Threads

  1. Creating an Access Search Form
    By Icky_Joe in forum Forms
    Replies: 2
    Last Post: 08-16-2010, 11:33 AM
  2. Search function in forms
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 03-14-2010, 06:17 PM
  3. Creating a Search Field
    By SKUPenn in forum Programming
    Replies: 1
    Last Post: 01-28-2010, 08:39 PM
  4. search function
    By Eric1066 in forum Access
    Replies: 0
    Last Post: 10-23-2009, 10:23 AM
  5. search,view and open function
    By blurboy84 in forum Reports
    Replies: 0
    Last Post: 10-08-2009, 11:42 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