Form with Subform

J

Joe

Sorry folks if this topic has already been addressed but I've searched the
topics and did not find what I need. Here is my focus. I want to create a
main form with customer first name, last name and customer number using info
from a customer table. I want my sub form to show custome date of sale, sale
amount and invoice number for each customer using info from the sales table.
How do I do this?

Thanks.
 
T

tina

does the sales table include a foreign key field, to hold the primary key
values of the related customer records? if so, are the customers table and
sales table linked, via those matching fields, in the Relationships window?

when you can answer yes to both questions, your tables are properly linked.
now you can build a form based on the customers table, then build a form
based on the sales table. open the customers form in Design view, then leave
it open, go to the database window, and drag the sales form into the Design
view of the customers form. that automatically creates a subform control,
with SourceObject property set to the name of the sales form,
LinkMasterFields property set to the primary key fieldname of the customers
table, and LinkChildFields property set to the related foreign key fieldname
in the sales table.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top