Enable/Disable Event Proceedure with Check Box

  • Thread starter Thread starter howescj
  • Start date Start date
H

howescj

Guest
Hi, bit of a noob here. I've searched for a while but I can't find anything related.

I have a data entry form that auto recalls the last entry that was made in it. I did this in an effort to speed up data entry. Anyways, here is the code I use.

Private Sub Investigator_AfterUpdate()
Investigator.DefaultValue = "'" & Investigator.Value & "'"
End Sub


Now the problem is that I want to be able to enable and disable this event proceedure with a check box. Is there a way to do this?

Thanks in advance for all your help.
 
Something like:
Code:
Private Sub Investigator_AfterUpdate()
 If Me.MyCheckBox Then
   Investigator.DefaultValue = "'" & Investigator.Value & "'"
 End If
End Sub
 
Thanks a lot! It works perfectly! :D
 

Users who are viewing this thread

Back
Top Bottom