Set subform to AllowAdditions=true from mainform button

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

Guest

Hi
I have 2 tables, Vehicles (PK "VehID") and Other Info (PK "OtherID"), joined
in a one to many by VehID field.
I have a main form "Vehicles" with a subform "Other Info" displaying related
records. From the main form's "Add New Record" how can I also set the
subform to allow new related records (AllowAdditions = True)?
I've tried Me.[Other Info].AllowAdditions = true which doesn't work... I'm
not sure what the syntax needs to be. Do I need to include "Form" here
somewhere? Please help.

I guess I'll probably have to save the Vehicle record before the Other info
table wil be able to accept a related record.

one to many relationship
 
Thanks PC Datasheet.. got it sorted now

PC Datasheet said:
You were very close!

Try:
Me![Other Info].Form.AllowAdditions = true

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


Rich1234 said:
Hi
I have 2 tables, Vehicles (PK "VehID") and Other Info (PK "OtherID"),
joined
in a one to many by VehID field.
I have a main form "Vehicles" with a subform "Other Info" displaying
related
records. From the main form's "Add New Record" how can I also set the
subform to allow new related records (AllowAdditions = True)?
I've tried Me.[Other Info].AllowAdditions = true which doesn't work...
I'm
not sure what the syntax needs to be. Do I need to include "Form" here
somewhere? Please help.

I guess I'll probably have to save the Vehicle record before the Other
info
table wil be able to accept a related record.

one to many relationship
 
Back
Top