C
CuriousMark
I'm trying to use a combo box to enable the user to begin typing in a name,
autofill if the name is in the database, or create a new record if the name
is not in the database. To abbreviate, I am working with two tables:
tblPatients
PatientID
PatientLastName
PatientFirstName
etc.
tblEncounter
EncounterID
PatientID
EncounterDate
EncounterCode
Each patient can have many encounters, so the encounters are a subform of
the Patient form. The goal: To enter a new encounter, the user types the last
name in the combo box for the PatientLastName. If the patient is in the
database, the combo box autofills and the user selects that name, and the
remaining fields in the Patient form populate appropriately. If the patient
is not in the database, the user keeps typing and a new record is created.
I have two problems: 1) Typing a new name simply changes the LastName field
for the existing record, rather than creating a new one; and 2) If I do
select a name from the combo box, the other fields don't populate.
Any help is appreciated. Thanks in advance.
CM
autofill if the name is in the database, or create a new record if the name
is not in the database. To abbreviate, I am working with two tables:
tblPatients
PatientID
PatientLastName
PatientFirstName
etc.
tblEncounter
EncounterID
PatientID
EncounterDate
EncounterCode
Each patient can have many encounters, so the encounters are a subform of
the Patient form. The goal: To enter a new encounter, the user types the last
name in the combo box for the PatientLastName. If the patient is in the
database, the combo box autofills and the user selects that name, and the
remaining fields in the Patient form populate appropriately. If the patient
is not in the database, the user keeps typing and a new record is created.
I have two problems: 1) Typing a new name simply changes the LastName field
for the existing record, rather than creating a new one; and 2) If I do
select a name from the combo box, the other fields don't populate.
Any help is appreciated. Thanks in advance.
CM