Prepopulating fields in a form

  • Thread starter Thread starter Robin Thompson
  • Start date Start date
R

Robin Thompson

My form uses 1 table as its control source. My subform
uses the same table in the control source.
Each form contains customer address data and the subform
lists the "purchases" per customer, to keep it simple.
When I enter a new customer on the form, all goes well.
When I want to create a new record, using an old customer
(adding to the subform purchases list) and I click on the
old customer's name in the dropdown list/primary key
field, the subform know where to get the data from, but
none of the rest of the fields on the form populate.
I've done it before, but I can't remember how! Please
help.
Thanks!
 
My form uses 1 table as its control source. My subform
uses the same table in the control source.

This isn't very wise... the form and subform will be competing to
update the same record!
Each form contains customer address data and the subform
lists the "purchases" per customer, to keep it simple.

and this makes it MORE COMPLEX, not simpler.

You're using a relational database - USE IT RELATIONALLY! If you have
a one (customer) to many (purchases) relationship, you should have
*two tables* - a table of Customers linked to a table of Purchases by
the unique CustomerID. The way you're doing it requires that you store
the customer name, address data, etc. etc. repeatedly and redundantly.
This is neither necessary nor wise; not only does it waste space, you
have to track down every record that contains customer information if
a customer's name or address changes.
 
Back
Top