Results 1 to 7 of 7
  1. #1
    Join Date
    May 2003
    Location
    California
    Posts
    6

    Unanswered: Finding records with a form

    I am a beginner in programming in MS Access. I have a table with account information on it. Basically, I just want to build a form where I can click a button and able to search the records in the table. If there is a match, the matching record should show up on the form...

    Would it better to do a macro and attach to the command button on the form or should i write some VB codes for the command button. Can someone help? Appreciate it!

  2. #2
    Join Date
    May 2003
    Location
    New York, NY
    Posts
    225

    VB Code is the way to go

    Give us some more information regarding the table you want to search. Field names, etc and what type of searchs you require

    Mark

  3. #3
    Join Date
    May 2003
    Location
    California
    Posts
    6
    The table would have field names like Account#, AccountName, CustomerID, CustomerName, etc... Basically, on the form, there will be a textbox where user can enter an Account#, and a command button named Search where user can click on the button.. If the account# entered matches with an account# on the table. The details on the account like acct#, acct name, customer#, customer name will then show up on a form...

    I just need to know how to write the code for the command button.

    Thanks for the help..

  4. #4
    Join Date
    May 2003
    Location
    New York, NY
    Posts
    225

    One Last Question

    Are you going to need to search only one of the fields or multiple?

    Mark

  5. #5
    Join Date
    May 2003
    Location
    California
    Posts
    6
    just one.. thanks

  6. #6
    Join Date
    May 2003
    Location
    New York, NY
    Posts
    225

    Searching records

    Mummmy,
    It was easier for me to create a sample db then to go into some long disertation. The db contains 1 table, 1 query, and 2 forms. On the sample search form type one of the values on the bottom of the form into the appropriate text box then click the search button. This is not the only way that you can do what you want but it is an easy concept to understand. If you have any question let me know


    Good Luck,

    Mark
    Attached Files Attached Files
    Last edited by Mark Gambo; 05-21-03 at 22:13.

  7. #7
    Join Date
    May 2003
    Location
    California
    Posts
    6

    Smile

    Thanks Mark. I'll try that.

Posting Permissions

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