Subform does not show details records

A

Alan T

My main form links to Invoice table:
ID
InvoiceNumber
Date
Sales

My subform links to InvoiceItem table:
ID
ItemNumber
Qty
Price
InvoiceID

These are Data tab of the sub-form:
Source Object: frmInvoice
Link Child Fields: InvoiceID
Link Master Fields: ID
Enabled: Yes
Locked: No

So on the main form whatever I navigator my invoices, the subform is always
empty.
 
G

Guest

Alan,

Your tables have identical ID-names. This makes it very hard to distinguish
the two of them. The problem could be that you are referencing the wrong ID.
By making the ID-field name more clear you are excluding a possible reference
problem.

Is the subform connected to the right ID?

Maurice
 
A

Alan T

Hi,

Yes, the subform is referencing the right ID.
On the Data tab:
Link Child Fields: InvoiceID
Link Master Fields: ID

The InvoiceID is the foreign key in the tblInvoiceItems.
So basically tblInvoiceItems.InvoiceID <--> tblInvoices.ID
 

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