ChkBox Caption change when clicked

  • Thread starter Thread starter d9pierce
  • Start date Start date
D

d9pierce

Hi all,
I have a check box on a form that when I click the checkbox, I want the
caption to change. I have this code on the click event and it works
fine with one minor detail, it changes all the records to this caption
and doesnt refresh when going from record to record.

Private Sub RecordLock_Click()
Me!RecordLock.Controls(0).Caption = IIf(Me.RecordLock = True, "Record
Locked", "Record Un-Locked")
End Sub

Is there some code I need to put on current or something? It holds the
check value and like I said, it does change the caption, but changes
the caption in all records and isn't record specific?

Lost in Click!

Dave
 
Hi all,
I have a check box on a form that when I click the checkbox, I want the
caption to change. I have this code on the click event and it works
fine with one minor detail, it changes all the records to this caption
and doesnt refresh when going from record to record.

Private Sub RecordLock_Click()
Me!RecordLock.Controls(0).Caption = IIf(Me.RecordLock = True, "Record
Locked", "Record Un-Locked")
End Sub

Is there some code I need to put on current or something? It holds the
check value and like I said, it does change the caption, but changes
the caption in all records and isn't record specific?

Lost in Click!

Dave
Try using the code in the form's on current event.

Keith.
www.keithwilby.com
 
Back
Top