Edit button for two controls only

G

GailK

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
 
B

Barry Gilbert

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

Me.optCoachingRecomm.Locked=False

Barry
 
G

GailK

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
 
B

Barry Gilbert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top