Results 1 to 4 of 4
  1. #1
    sephiroth2906 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    73

    Button to search table with any field in form


    Hello all!

    I am a real noob here, so if this is simple, please forgive me.

    I have a table for logging entries of copies made. I have a form that we are using to update that table. The form has all of the same fields as the table, so all of the entries are made there to avoid anyone who knows less than me (if that were possible) to accidentally mess up anything on the table.

    I have made some buttons to do various things on there, but I would like to have one that performs a search for a record based off of whatever fields have been filled in by the user, basically the equivalent of right clicking a field and choosing the "Equals" option. When I choose the "Equals" option from the context menu, it simply pulls up the matching record in the form and all of the associated fields. If there are more than one match, I can click next record to view it. I would like my button to simply tell the form to search "Equals" to the entered field(s).

    I am eager to learn and would appreciate any help you might be able to give me.

    Thanks!
    Last edited by sephiroth2906; 04-19-2011 at 09:44 AM.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One option is demonstrated in the sample db here:

    http://www.baldyweb.com/BuildSQL.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sephiroth2906 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    73
    *Sigh*
    I was hoping to avoid scripting. I knew I was going to have to learn eventually, but I guess the time has come. That link went so far over my head that it hit an airplane.

    Anyone have any good tutorials they can recommend for me online to start learning vba?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Oh, there are other ways (though I'd dive in and learn VBA). You can use this technique in a query to only consider fields that have been filled out:

    http://www.mvps.org/access/queries/qry0001.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 11
    Last Post: 06-02-2011, 10:21 AM
  2. Replies: 9
    Last Post: 02-15-2011, 03:05 PM
  3. search button on Form
    By josejuancruz in forum Access
    Replies: 1
    Last Post: 12-23-2010, 07:21 PM
  4. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  5. program find button to search whole table
    By sammer021486 in forum Programming
    Replies: 2
    Last Post: 10-01-2009, 06:36 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