D
dave
following is my code and is giving me runtime error-2113, please suggest any
modications needed to the code.
Private Sub doctorid_GotFocus()
Dim doctorid As Long
Dim SQL As String
If VISITTYPE = "First Visit" Then
Forms!marketers!doctorid = Nz(DMax("[DOCTORID]", "MARKETERS"), 0) + 1
Else
Forms!marketers!doctorid = "SELECT MARKETERS.DOCTORID FROM marketers WHERE
(((MARKETERS.LAST)=FORMS!MARKETERS.LAST) And
((MARKETERS.FIRST)=FORMS!MARKETERS.FIRST))"
End If
End Sub
modications needed to the code.
Private Sub doctorid_GotFocus()
Dim doctorid As Long
Dim SQL As String
If VISITTYPE = "First Visit" Then
Forms!marketers!doctorid = Nz(DMax("[DOCTORID]", "MARKETERS"), 0) + 1
Else
Forms!marketers!doctorid = "SELECT MARKETERS.DOCTORID FROM marketers WHERE
(((MARKETERS.LAST)=FORMS!MARKETERS.LAST) And
((MARKETERS.FIRST)=FORMS!MARKETERS.FIRST))"
End If
End Sub