I am new to access, am building a DB for a lab, the DB uses a switchboard that opens full screen to different forms with only options to add a new record. I have different forms for each test and about 80% of the data entered is just info on the item. The problem is, the way I currently have it setup I can only add one record (because of Primary Key). The item number being tested is my primary key, and then other info on the item.
What I would like to do, but don't know how....
The item number is the first field on each form I have and the first 15 fields or so are the same on each form. I would like to enter the item number, then tab to the next field. Upon the tab stroke, have that field check the database to see if that primary key is already recorded. If so, update all other item fields, and allow me to only update the testing fields. If not, allow me to continue adding the item info. We do several different tests on items, sometimes only one test per item, sometimes many per item with results coming in at different times. I never know the item I am entering is in the DB until I enter the item and then get a message the record can't be updated because it would duplicate the primary key. Everything seems to work correctly on the DB if I only have one test per item. Any help is appreciated. Thanks.
What I would like to do, but don't know how....
The item number is the first field on each form I have and the first 15 fields or so are the same on each form. I would like to enter the item number, then tab to the next field. Upon the tab stroke, have that field check the database to see if that primary key is already recorded. If so, update all other item fields, and allow me to only update the testing fields. If not, allow me to continue adding the item info. We do several different tests on items, sometimes only one test per item, sometimes many per item with results coming in at different times. I never know the item I am entering is in the DB until I enter the item and then get a message the record can't be updated because it would duplicate the primary key. Everything seems to work correctly on the DB if I only have one test per item. Any help is appreciated. Thanks.
Comment