Dreaded Subforms

  • Thread starter Thread starter Marcus
  • Start date Start date
M

Marcus

I am fairly new to subforms and have the following problem
if anyone can help:

I have a subform which is part of a form which has its
allowedits property set to "NO".

There is a command button which amongst other things then
allows the form to be edited. However the records on the
subform cannot be edited despite there being a piece of
code allowing Me.Allowedits = True. Once the button is
actioned all other controls can be edited.

The mystery is that if the forms property sheet is set to
allowedits "Yes", the subform becomes editable. However I
want to control the editing through th command button.
Am I missing something?????
 
Marcus,

This is a sample of code I use to totally unlock a protected form. In the
subform section the 'frmBudgetDetailsSub' is the name of the subform control
that holds the subform, NOT the name of the subform itself.

Gary Miller

' ********************
' Master
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True
' SubForm
Me!frmBudgetDetailsSub.Form.AllowAdditions = True
Me!frmBudgetDetailsSub.Form.AllowEdits = True
Me!frmBudgetDetailsSub.Form.AllowDeletions = True

' *********************
 
Marcus,
Try using a macro to turn this funcition on. the on exit
it runs another macro that resets the funtion back to no.
This way it is controlled through the use of buttons and
on update or whatever you chooose to set the status back
to locked.

Kevin
 
Back
Top