G
Guest
In a subform I am inputting records. If the length of alngzPatientNumber
field is 7 then I want to enable the chrPatientName field which is the last
field in the record, otherwise I do not want it enabled. Here is the code I
am using but when I run it the debug error window comes up.
Private Sub txtPatientNumber_Exit(Cancel As Integer)
If (Len(Me!lngzPatientNumber) = 7) Then
Me.chrPatientName.Enabled = True
Else
Me.chrPatientName.Enabled = False
End If
End Sub
field is 7 then I want to enable the chrPatientName field which is the last
field in the record, otherwise I do not want it enabled. Here is the code I
am using but when I run it the debug error window comes up.
Private Sub txtPatientNumber_Exit(Cancel As Integer)
If (Len(Me!lngzPatientNumber) = 7) Then
Me.chrPatientName.Enabled = True
Else
Me.chrPatientName.Enabled = False
End If
End Sub