Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Existing Record

Status
Not open for further replies.

kristi1023

Programmer
Jan 8, 2002
59
US
I have a training database where an employee will both add and edit his/her training report. The form consists of a main form and 2 subforms. My problem is that when an employee enters employee id, which is the primary key, a new record is created instead of just retrieving the data from the existing record (if a record does exist). This problem only occurs on the main form; the records in the subforms are retrieved based on the employee id. I've tried me.requery on the exit event of the employee id field with no success. Any ideas? Thank you.
 
Is the main form set to DATA ENTRY only?

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Okay, then are you linking the MAIN form and the SUB forms with the appropriate CHILD and MASTER link fields?

Take a look at the CUSTOMER ORDERS form in the Northwind database that comes with Access. It's a great example of what you're trying to do, and it has 2 sub-forms.

Good luck.

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top