I have searched through the various forums, and have figured out how to disable a textbox when a checkbox is checked. The problem I am having is, this carries on to every record. When I go to the next record (record 2, 3, and so forth), the textbox is disabled, even though the VM checkbox is not checked.
Here is the code that I have:
Private Sub VM AfterUpdate()
If Me.VM = -1 Then
Me.NSAID.Enabled = True
Else
Me.NSAID.Enabled = False
End If
End Sub
Private Sub frmAsset ()
If Me.VM = -1 Then
Me.NSAID.Enabled = True
Else
Me.NSAID.Enabled = False
End If
End Sub
Next, is there an easy way to write this code if I have more than one textbox to disable when the checkbox is checked?
Thank you in advance for your assistance.
Here is the code that I have:
Private Sub VM AfterUpdate()
If Me.VM = -1 Then
Me.NSAID.Enabled = True
Else
Me.NSAID.Enabled = False
End If
End Sub
Private Sub frmAsset ()
If Me.VM = -1 Then
Me.NSAID.Enabled = True
Else
Me.NSAID.Enabled = False
End If
End Sub
Next, is there an easy way to write this code if I have more than one textbox to disable when the checkbox is checked?
Thank you in advance for your assistance.