View Single Post
  #5  
Old July 24th, 2009, 04:53 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Table/Forms Design Question

On Thu, 23 Jul 2009 13:36:01 -0700, Damian
wrote:

I am Trying to create Daily Reports for my company.
I created tables for Carpenters, Laborers, Surveyors, Ironworkers etc.
Each of these has fields *_Name, #ofForeman, #ofWorkers, #ofLaborers.
ex.
"Carpenters Table
CarpentersName Foreman Worekman Laborer
Joe 2 1 5
Bill 1 5 2
"
"Laborers Table
LaborersName Foreman Worekman Laborer
Frank 1 1 0
"
And so on (you get the picture)

Now are those tables Normalized? I know I am repeating Foreman,Workman &
Laborer in each one of them but each of these tables has different Names and
different quantaties of people.


I'd change your design completely. Putting data (the type of worker) in a
tablename or a fieldname is simply WRONG DESIGN.

Workers
WorkerID Primary Key, perhaps an autonumber
WorkerName (I'd actually use LastName and FirstName as separate fields
WorkerType e.g. Carpenter, Laborer, Surveyor, ...

WorkerData
WorkerID link to Workers
DataType e.g. "Foreman", "Laborer"
DataValue your 2, 1, 5 etc., whatever they mean


I created a form for Carpenters - A tabular form so I see All names for each
Carpenter in seperate box and next to them their Foreman/Workman/Laborer.
I also included a total column at the end which adds up each row. I can edit
the fields each day and the total is changing. (thats good)

The problem is I have to create a Form for Each Table seperately.
Can I put Table CArpenter/ Laborer/ etc.. into one form and be able to view
it and edit like I can the single Carpenters Form? I cant seem to make it
work.

Im reading all these access books and I cant find the answers I am looking
for anywhere.

I also created a Querie that sum up all Foreman for each Name each workman
for each name and so on. Plus a final total Column which sums up everyone. It
works great, BUT when I try to make it show up on the Form I cant. I can do
it as a footer but it does not automatically update when I change the values.
I have to close it and come back in. Why is that?

I know I am asking a lot and I hope you guys can help me.
Thank you


Get your table design right first and then work on the forms.
--

John W. Vinson [MVP]