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

Relationships - Newbie

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Ok Guys, here I go:

I have one table (tblMain) that stores Employee names, IDs, and shift information along with a total of time they worked during the year. I have another table (tblTime) that has same employee names and IDs but also has tables for time they worked during each week. My continuous form shows the employee ID and name and then a 10 day work week. I am hoping that I can pull the names and IDs from tblMain and the work week from tblTime. I am a newbie so I apologize for my ignorance. What should I do to make this work. If it is too vague let me know... THANKS ALOT!!!!
 
First of all I would change your table setup a bit. Create a table called tblEmployee with EmployeeID as your Primary key. Also include any other relevant information about the employee (SSN, Date of Hire, dept, etc). Create a second table called tblTime in which you create fields regarding time information. Add a foreign key of EmployeeID to tblTime with the same data type as tblEmployee. Create a query adding fields from both tables and relate the two according to the EmployeeID field. You can declare the relationship with the Relationships icon in database view.
 
Once I create the query, will the user be able to add information when the form is displayed with the query as the source?
 
Typically yes, however you should build the query and try some test entries right in to the query.

I was searching for a thread in here from last week where I described to someone how I had set up a time record system. Darned if I can find it (Mr.Murphy??). In short, my set up goes even deeper: Employee data-Employee Monthly (Locks lower levels)-Employee Days-(Default loads every day of the month, considers weekends for "overtime"...sick days etc.-Employee time: in and out times i.e.: in at 8:01 out at 12:06 in at 1:03 and out at 5:05. This is real precision!
Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top