By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Query A Table Using A Value From A Form

P: 23
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?
Aug 27 '08 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,619
  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>]
Aug 27 '08 #2

P: 23
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.
Aug 27 '08 #3

ADezii
Expert 5K+
P: 8,619
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.
Aug 27 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.