View Full Version : Need patientID (primaryKey) to auto find


jabrum
06-01-2001, 07:39 AM
A novice here.

I created a db for info on hospital patients. The Primary Key (no duplicates)is an ID number assigned by the hosptial, and is therefore not auto-created by Access. My goal is for the patientID field on the data input form - on enter - scan the DB for the ID, and if already present, give a notice that the ID already exists in the DB and then open the record on that same form.

Any help in this would be much appreciated.

Jack Cowley
06-01-2001, 09:04 AM
You can use a combo box for this. If the ID does not exist then you can use the NotInList event of the combo box to open your input form. If the ID does exist then Access will take you to the correct record. Search Help for NotInList or see the article below for more specific help.
http://support.microsoft.com/support/kb/articles/Q161/0/07.asp?LN=EN-US&SD=gn&FR=0&qry=q161007&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

jabrum
06-01-2001, 09:15 AM
This sounds great, but I would prefer to not use a combo field... and work this from a text field.