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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Major Help

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
US
I created a db, with 3 tables: tbl1-Employee Data, tbl2-SERP, and tbl3-SIP/SESP. They all have Employee IDs (autonumber). I have a form called Search Employees: Here the user enters the employee name and then click on search when they click on search another form opens up with the selected employee's record. This form has 3 tabs, one for Employees info, the other for SERP and the last one for SIP/SESP. The problem occurs when searching the selected employee, tab 1 is correct but tab 2 and tab 3 is incorrect. Please help!!!!!!!!!Thanks
 
If you're using Autonumber fields in all three tables, and expecting the employee id's to come out the same in all three for the same employee, well, I'd say you've got a big[/i] problem. There's no way you could keep the employee id's synchronized for very long.

But if you meant the EmployeeID is an Autonumber in one, which you're copying to Numeric (Long) fields in the other two, then what do you mean when you say tabs 2 and 3 are "incorrect"? Are they empty, or do they show the wrong data? What is the record source for this form? Is it a join of all three tables on EmployeeID? Rick Sprague
 
RickSpr,

Tabs 2 and 3 are showing the wrong data. The record source for Tab 2 is SERP-tbl and Tab 3 is SESP-tbl, and yes the three tables are join by EmployeeID...Any suggestions
 
You still haven't said whether the EmployeeID field is an Autonumber in each of the three tables. If it is, that's causing your problem. It should only be an Autonumber in the Employee Table. It should be a Long Integer in the other tables, and the values in them should be set to match [Employee Table].[EmployeeID].

The join matches records with the same EmployeeID. But if the EmployeeID's are Autonumbers, they're independently generated, and there's no guarantee that one employee will get the same number in all three tables. If they get out of synchronization, the join will match records for different employees together. That would explain what you're seeing. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top