Enable form fields based on another fields input

  • Thread starter Thread starter Joseppi4Life
  • Start date Start date
J

Joseppi4Life

I have a form called frmIncident based on a table calle
tblInvestigations. (Please don't ask - :?
On the form, I have a textfield called MPsFileNumber and a checkbo
(Yes/No) called Criminal. What I'd like to do is have th
MPsFilenumber field inactive by default and only activate the fiel
when the Criminal field is set to YES

Is this possible, and how

Thanks in advance
 
In the form's Current event, put code along the lines of:

Me..MPsFileNumber.Enabled = ((Me.Criminal & "") = "Yes")

That's assuming that Criminal is a text field. If it's actually a boolean
field use:

Me.MPsFileNumber.Enabled = Me.Criminal
 
Thanks Douglas

Here's the code I've entered into the after update on the Crimina
field. It seems to be working

Private Sub cbCriminal_AfterUpdate(
If Me!Criminal = Yes The
Me!MPsFileNumber.Enabled = Fals
Els
Me!MPsFileNumber.Enabled = Tru
End I

End Su
 
Back
Top