J
John S. Ford, MD
I have table tblPatients with the following fields:
PatientIDNum (Autonumber)
PatientNameLast (Text)
PatientNameFirst (Text)
PatientMRNum (Text)
Field PatientMRNum is a 7 character medical record number each character of
which is incidently a numeric character.
I have a form with TextBox txtIDNum in which users the patient's MRNum
number. A command button on the form has the following code:
MsgBox "Is patient " & DLookup("PatientNameLast", "tblPatients",
"PatientMRNum=" & txtPatientMRNum) & " the patient whose chart you're
reviewing?"
Unfortunately, DLookup apparently thinks the contents of txtPatientMRNum are
integers because this code generates a data mismatch error. The code WILL
work perfectly if I change the datatype of PatientMRNum in tblPatients to
Number (but I don't want to do this).
Is there a way to get the txtMRNum to interpret the entry as a simple text
instead of a numeric?
Thanks in advance!
John
PatientIDNum (Autonumber)
PatientNameLast (Text)
PatientNameFirst (Text)
PatientMRNum (Text)
Field PatientMRNum is a 7 character medical record number each character of
which is incidently a numeric character.
I have a form with TextBox txtIDNum in which users the patient's MRNum
number. A command button on the form has the following code:
MsgBox "Is patient " & DLookup("PatientNameLast", "tblPatients",
"PatientMRNum=" & txtPatientMRNum) & " the patient whose chart you're
reviewing?"
Unfortunately, DLookup apparently thinks the contents of txtPatientMRNum are
integers because this code generates a data mismatch error. The code WILL
work perfectly if I change the datatype of PatientMRNum in tblPatients to
Number (but I don't want to do this).
Is there a way to get the txtMRNum to interpret the entry as a simple text
instead of a numeric?
Thanks in advance!
John