Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a subforms AllowAdditions (eg) programmatically

Status
Not open for further replies.

andegre

MIS
Oct 20, 2005
275
US
While cycling through the records of a form, when I get to a new form, I want the AllowEdits, AllowDeletions, and AllowAdditions to be changed to True programmatically. How do you do this through code.

I've tried:
Forms![formname].[subformname].allowadditions = true
and that does not work.

Is there another way to access the subform's properties?
 
Try this

Forms![formname].[subformname].Form.allowadditions = true
 
That brings up the first line of the subform but the first field (Packing_Slip_ID) contains "#error".

I tried coding in the value from the main form like this:
forms!packing_slip.packing_slip_contents_subform.form.packing_slip_id = me.packing_slip_id

and that didn't work. It said I can't assign a value to this object.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top