Adding new records on subform problem

G

Gibson

I have two forms, each with a subform displayed in datasheet view. Each
subforms control source is a table with three (3) key fields. When I open
one of the forms I can add a second record in one of the subforms key
fields and the other 2 key fields are automatically filled in with the same
data that is in the first record thus I can save the second record. On the
second form filling in one of the key f ields on the sub form does not
automatically put data in the other 2 key fields thus I get a duplicate of
blank key field or indexed field error. Can anybody tell me why? The tables
and forms are virtually identically in format.
 
W

Wolfgang Kais

Hello Gibson.

Gibson said:
I have two forms, each with a subform displayed in datasheet view.
Each subforms control source is a table with three (3) key fields.
When I open one of the forms I can add a second record in one of the
subforms key fields and the other 2 key fields are automatically filled
in with the same data that is in the first record thus I can save the
second record.

The other 2 key fields are automatically filled with the same data from the
main form.
On the second form filling in one of the key f ields on the sub form
does not automatically put data in the other 2 key fields thus I get
a duplicate of blank key field or indexed field error. Can anybody
tell me why? The tables and forms are virtually identically in format.

Compare the data properties of the two subform controls, especially
the LinkChildFields and LinkMasterFields properties.
 

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