Well, duplicates are likely to happen at some point, so the wise move is to
be ready for them. Here's what I use in a similar situation where I need to
look for existing names:
You should have:
A Student table containing names and the autonumber ID's asssigned by you,
and any other non-changing information about the student (e.g. date of
birth, parents' contact info, etc. - nothing about your meetings with
students)
A Session table which contains a record for every time you "see" a student.
This should contain the numeric ID and other data pertinent to *this
meeting* e.g date/time scheduled, date/time started, date/time ended,
reason, outcome, follow-up, etc. To ensure that you enter the data for each
session only once, you might want to create a compound unique index on ID
and date/time scheduled.
Create a form for entering and displaying session information. To enter
session data, open the Session form and put it in data entry mode to create
a new instance of a session record. Enter the student's name and click a
command button.
The Click event searches the student table for name matches, and if not
found, creates a new entry in the student table, assigning it the next
autonumber, and returns that number to your Session form. If found, the
procedure populates a listbox with *all* names that match the input name,
along with ID's. You then select the appropiate one to be entered into the
session form.
-TedMi