Edit button for two controls only

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

Guest

Hi,

Using Access 2000
Would like to have one "edit" command button for two option groups -
Coaching Recommendation and Coaching Actioned [each a yes/no] - which will
allow the coach to update these two controls accordingly in the record being
viewed only while all other controls in form remain locked. I am unclear with
how to code this request.

Currently I have the edit and deletion options to No and additions to Yes on
the form.

Edit button coding :
Private Sub cmdEdit_Click()
Me.AllowEdits = Me.CurrentRecord
Me.AllowEdits = True

End Sub

form OnOpen Event :
Private Sub Form_Current()
Me.AllowEdits = False
End Sub

thx
 
In your edit button's code, affect the option groups' Locked and/or enabled
properties.

Me.optCoachingRecomm.Locked=False

Barry
 
Sorry, I must be doing something wrong because when I add this line I receive
the following error message : Method or data member not found ... and the
work Locked is highlighted.


Barry Gilbert said:
In your edit button's code, affect the option groups' Locked and/or enabled
properties.

Me.optCoachingRecomm.Locked=False

Barry

GailK said:
Hi,

Using Access 2000
Would like to have one "edit" command button for two option groups -
Coaching Recommendation and Coaching Actioned [each a yes/no] - which will
allow the coach to update these two controls accordingly in the record being
viewed only while all other controls in form remain locked. I am unclear with
how to code this request.

Currently I have the edit and deletion options to No and additions to Yes on
the form.

Edit button coding :
Private Sub cmdEdit_Click()
Me.AllowEdits = Me.CurrentRecord
Me.AllowEdits = True

End Sub

form OnOpen Event :
Private Sub Form_Current()
Me.AllowEdits = False
End Sub

thx
 
The locked property should apply to the name of the Option group on your
form. Are you sure you are referencing the option group control and not
something else?

Barry

GailK said:
Sorry, I must be doing something wrong because when I add this line I receive
the following error message : Method or data member not found ... and the
work Locked is highlighted.


Barry Gilbert said:
In your edit button's code, affect the option groups' Locked and/or enabled
properties.

Me.optCoachingRecomm.Locked=False

Barry

GailK said:
Hi,

Using Access 2000
Would like to have one "edit" command button for two option groups -
Coaching Recommendation and Coaching Actioned [each a yes/no] - which will
allow the coach to update these two controls accordingly in the record being
viewed only while all other controls in form remain locked. I am unclear with
how to code this request.

Currently I have the edit and deletion options to No and additions to Yes on
the form.

Edit button coding :
Private Sub cmdEdit_Click()
Me.AllowEdits = Me.CurrentRecord
Me.AllowEdits = True

End Sub

form OnOpen Event :
Private Sub Form_Current()
Me.AllowEdits = False
End Sub

thx
 
Back
Top