Auto populat form fields

  • Thread starter Thread starter Sandra
  • Start date Start date
S

Sandra

How can I to link a form to a query or table so if I enter
a key field it will auto populate other fields if the
information is available?
As you can tell I don't know much about forms so any help
would be appreciated!!
Thanks
Sandra
 
Auto-populating fields is a very BAD idea. In a relational database, if the
data is stored once, you should not have to store it again. You should just
relate the tables and JOIN the information back together when you need it.

For instance, suppose you have a Customers table and an Orders table. You
should not copy all of the data from the Customers table into the Orders
table, you should just copy the Primary Key value from the Customers table
into a field in the Orders table. That way you can use a JOIN query to get
the customer data wthout storing it over and over again.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Did you ever find out how do what you are asking? I need to do the same
thing. I need to enter an ID on a form and have it show me the coresponding
First and Last name from the table. just need to see the data on my form I
don't care if it populates a table.

Thanks!
 
Hi Smitty, Sandra,

For learning purposes try this:

Make a copy of the form that already shows data from the table in question
and give it a new name.

In your new form show Header and Footer.

With wizards enabled on the Toolbox, click the combobox once and then put a
new combobox in the header. The wizard will ask you what you want to do.
Tell it you want to go to a specific record. It will create the code for
you. Look in its the AfterUpdate event when you're all done.

When you're satisfied that the combobox is working as you want it, you're in
business. I'll leave it to you to get a working with the combobox.

HTH
 
Back
Top