Sub Form Problem

  • Thread starter Thread starter Chris Kennedy
  • Start date Start date
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.
 
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.
 
Back
Top