sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Aric Green's Avatar

Query A Table Using A Value From A Form


Question posted by: Aric Green (Newbie) on August 27th, 2008 02:38 PM
I have a form that contains customer information. I want to use the ID_NUMBER to query another table (when I click a button) to return the record that matches that ID_NUMBER. What is the easiest way to do this?
3 Answers Posted
ADezii's Avatar
ADezii August 27th, 2008 02:57 PM
Expert - 4,211 Posts
#2: Re: Query A Table Using A Value From A Form

  1. Create a Query based on your Customer Table.
  2. In the Criteria Row for the ID_NUMBER, set Criteria similar to the following:
    Expand|Select|Wrap|Line Numbers
    1. [Forms]![<Your Form Name>]![<Field contained ID_NUMBER>]
Aric Green's Avatar
Aric Green August 27th, 2008 03:25 PM
Newbie - 20 Posts
#3: Re: Query A Table Using A Value From A Form

Thanks ADezii. That is what I was thinking but it was not working. I figured it out though. I was creating a new record on the form and using the query to append the ID NUMBER to other tables to create a record automatically on them to use later. I wasn't requerying the form and going back to the record before running the append querys so it was not creating the new record in the other tables. Now that I have figured this out I just have to write the code to do that. Again thanks.
ADezii's Avatar
ADezii August 27th, 2008 04:04 PM
Expert - 4,211 Posts
#4: Re: Query A Table Using A Value From A Form

Quote:
Originally Posted by Aric Green
Thanks ADezii. That is what I was thinking but it was not working. I figured it out though. I was creating a new record on the form and using the query to append the ID NUMBER to other tables to create a record automatically on them to use later. I wasn't requerying the form and going back to the record before running the append querys so it was not creating the new record in the other tables. Now that I have figured this out I just have to write the code to do that. Again thanks.

You are quite welcome, Aric.
Reply
Not the answer you were looking for? Post your question . . .
197,038 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,038 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Microsoft Access / VBA Contributors