Sub Form Problem

C

Chris Kennedy

I have a subform which links to a master form. The relationship works fine
except when I add a new record for the master table. I have a button which
jumps to a new record and calculates a primary key for the master form and
inserts it into the value of a text field bound to the primary key of the
master table. When I add new records to the subform I get an automation
error from the Link Master fields property. I think it is not passing the
generated primary key to the subform. I have tried several way of setting
the subform foreign key on the add new record event and setting the default
value. Nothing works successfully. Any ideas.
 
G

Guest

Chris,
Try deleting the Subform from the Masterform then reinserting it (drag and
drop).
If you have any default values in the controls on the Subform, remove them.
If the latter is true I've had the same problem and got an answer through
the forum at www.utteraccess.com
This is a bug in Access that happens when you have any default values in any
of the Controls (text boxes etc) on the subform. Another condition that seems
to be necessary for the Bug is that the One side of the relationship be an
Autonumber field. I've tried to find out if MS have released a bug fix yet,
but so far no joy.
Hope this helps, Nat.
 

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