Add a record in a subform not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with 3 subforms in it. I would like to be able to add records
to the subforms while they are open, but it does not seem to want to comply.
I have checked the properties for the forms and subforms and all seem to
agree that adding records is allowed. There is one thing that may complicate
the matter. One of the fields that is connected by relationship is not shown
in the subform. I assume I will have to set this value using a macro when
the new record is created. Could this be hindering the process?

Thanks,

Ryan
 
Ryan said:
I have a form with 3 subforms in it. I would like to be able to add records
to the subforms while they are open, but it does not seem to want to comply.
I have checked the properties for the forms and subforms and all seem to
agree that adding records is allowed. There is one thing that may complicate
the matter. One of the fields that is connected by relationship is not shown
in the subform. I assume I will have to set this value using a macro when
the new record is created. Could this be hindering the process?

Thanks,

Ryan

It could be. If your subforms are based on tables which have
relationships which have referential integrity enforced.

What you can do is to have the field on the form, but set it's visible
property to false.

Then as long as the link child fields and master fields are set
properly, when you try and create a new record on the subform, it will
automatically populate the link field from the master form.
-D
 
Ryan said:
I have a form with 3 subforms in it. I would like to be able to add records
to the subforms while they are open, but it does not seem to want to comply.
I have checked the properties for the forms and subforms and all seem to
agree that adding records is allowed. There is one thing that may complicate
the matter. One of the fields that is connected by relationship is not shown
in the subform. I assume I will have to set this value using a macro when
the new record is created. Could this be hindering the process?

Thanks,

Ryan

It could be. If your subforms are based on tables which have
relationships which have referential integrity enforced.

What you can do is to have the field on the form, but set it's visible
property to false.

Then as long as the link child fields and master fields are set
properly, when you try and create a new record on the subform, it will
automatically populate the link field from the master form.
-D
 
Back
Top