M
Mary
I have a main form called frmBatchHeader and a tabbed form imbedded in the
main form. One of the pages in the tabbed form has a subform called
fsubLLines. Within this form I have an integer field called txtPatientNumber
its control source is lngzPatientNumber. After the user types in the
txtPatientNumber, I am attempting to enable the field txtPatientName if the
length of txtPatientNumber is equal to seven with Event Procedure in the "On
Exit" property. This code works well until I click the "Add Record" button
then I get a Run-time error 2424. Can anyone out there help me resolve this
problem? Here is the code.
Private Sub txtPatientNumber_Exit(cancel As Integer)
If (Len(Me.txtPatientNumber & "") = 7) Then
Me.txtPatientName.Enabled = True
Else
Me.txtPatientName.Enabled = False
End If
End Sub
main form. One of the pages in the tabbed form has a subform called
fsubLLines. Within this form I have an integer field called txtPatientNumber
its control source is lngzPatientNumber. After the user types in the
txtPatientNumber, I am attempting to enable the field txtPatientName if the
length of txtPatientNumber is equal to seven with Event Procedure in the "On
Exit" property. This code works well until I click the "Add Record" button
then I get a Run-time error 2424. Can anyone out there help me resolve this
problem? Here is the code.
Private Sub txtPatientNumber_Exit(cancel As Integer)
If (Len(Me.txtPatientNumber & "") = 7) Then
Me.txtPatientName.Enabled = True
Else
Me.txtPatientName.Enabled = False
End If
End Sub