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

Correct implementation of database concept? Insight needed/execution

Status
Not open for further replies.

BDCarrillo

Technical User
Jul 9, 2010
30
US
Here is the basic data model & background info:

-12 different work centers, each with distinct information
-Weekly recurring shifts with up to three employees per week (simple friday-friday, no issue with holidays/time off)
-Ability to generate a weekly roster report of workcenter supervisor and primary worker

I have successfully accomplished the above with the following structure:

-tblRoster_Data
Stores weekly data per work center in one record (all three names in distinct fields)

-tblShop_Data
Stores unique data for each work center

-Various data I/O forms and a final report

--end of background info--

I am attempting to improve this with a new "roster" table containing data for each worker and (somehow) linking it to the Roster_Data via a unique worker identifier. I can create a form and combo box setup to automatically recall data from previous employees or allow the entry of new ones with the storage of a unique ID in the Roster_Data table. My problem arises when I try to view the data as a coherent entry on an overview form.

Basically, I cant figure out how to "output" or "link" the following correctly:

Roster_Data entry:
week start|week end |Primary ID|Alternate ID
some date |some date|10 |42

Roster entry:
PK|Name|Phone
10|John|1234567
42|Bob |9876543

The form has text boxes for each "linked" field so concatenation is not required.

I was able to partially succeed with proper data output via query, but given two Roster_Data records and two Roster records, I received four distinct outputs, whereas I only required the two Roster_Data ones. This was done via referencing a query that matched the PK and Primary ID codes.

/novel
 
By "all three names" I meant "three distinct employees per shift
 
Table list:

Roster_Data (table)
Fields:
ID
Primary_Name
Alternate_Name
Alternate1_Name
Shop_Code
Start_Date
End_Date
Update_Date

Shop_Data (table)
Fields:
Supervisor
Alt_Supervisor
Shop_Cell
Shop_Standby
Shop_Code
Update_Date

Roster (table)
Fields:
ID
Name_1
Cell_1
Home_1
Standby_1
Shop_Code


All of the name fields in Shop_Data and Roster_Data will contain unique numerical references that need to link to the information in the Roster table
 
...you can join multiple copies of the Roster table to tblRoster_Data. "

This post (on the Tables forum) did it. I can't believe I overlooked something so simple... got it all working right a few minutes after I read your post.

Star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top