CheckBox Message

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

Guest

Hello,

Was just kind of wondering why a msgbox does not appear when a checkbox is
clicked? I have the OnClick event to display a msgbox but when the checkbox
is clicked nothing happens. Here is an example:

Private Sub Studio_Click()
If (Me.AllowEdits = False) Then
Me!Studio.Locked = True
MsgBox "You must unlock record by clicking the 'Edit' button in
order to make changes to record."
ElseIf Me!In_Active = True Then
Me!Studio.Locked = True
MsgBox "You cannot make changes to an In-active record. This record
must be set to 'Active' in order to make changes to the record."
ElseIf (Me.AllowEdits = True) And Me!In_Active = False Then
Me!Studio.Locked = False
End If
End Sub


Everything else works great except for the message box does not come up when
intructed to do so. Any assistance you can provide to help me get this code
into shape so it listens when its supose to will be greatly appreciated.

I thank you for your time and shall look forward to any responses. Have a
great day!
 
Use the GotFocus event of the checkbox control to decide whether to lock or
unlock the checkbox and to run the code, instead of the Click event.
 
Sweet! Worked like a charm!

Thanks Ken! You rock!
--
Randy Street
Rancho Cucamonga, CA


Ken Snell (MVP) said:
Use the GotFocus event of the checkbox control to decide whether to lock or
unlock the checkbox and to run the code, instead of the Click event.
 

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

Similar Threads


Back
Top