Thanks Dennis, works beautifully
Other than just turning on the subform's AllowAdditions, I also would like
to unlocked the controls and change their forecolor in the subform, using the
same command button. But the lines I tried below seem wrong as an error
message says "Method of data member not found". What would be the correct way
of doing it then? The defalut view of the subform is Datasheet.
Private Sub cbEditAmendment_Click()
' Turn on the subform's AllowAdditions property
Me.NameOfSubform.Form.AllowAdditions = True
' Unlock all controls in the subform
Me.NameOfSubform.FormerDWGNo.Locked = False
' ("FormerDWGNo" is hightlighted as error)
Me.NameOfSubform.FormerDWGNo.ForeColor = 225
End Sub
Regards,
Sam