AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > MS Access

Using MS Access - MS Access


Expert: Scottgem - 8/2/2004

Question
I have a form created with text boxes and labels to specify the fields. I have already created a customer table for the customer's personal information and one for the products they order. I want to be able to type in a customers ID # in one of the text boxes)or another field that I specify), click a button and have all the other fields fill in based on values in the database. I am having trouble linking the text boxes on the form to the database and the button that runs the 'query'. Can you help?

Answer
What you should do is create a BOUND form. This is done by setting the recordsource property to your table and the Controlsource of each control to your fields. Or better yet, use the wizard to create your form.

Once this is done, you can use the combobox Wizard to create a search combo where you can choose the customer and bring up their record.

If you want to display the products they order in the same form, then use a subform.

BTW you should have 2 tables for orders. One for the specific order info (order#, orderdate, shipping info, etc.) and one for the order details, each individual item they order.

Check the Northwinds sample database that comes with Access for examples.

Hope this helps,
Scott<>

Please don't forget to provide feedback for this response (either by rating or followup). It helps me help people better if I know how my advice worked.

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.