No Pete, I don't really want to get involved in something from the
bottom. You're still asking for a solution without fully defining it.
I won't play 20 questions. Maybe someone else will ...
What follows is in the vein of "A word to the wise". It is all
intended kindly but may sound harsh or judgemental. It isn't intended
to be.
Most people starting in Access believe that the problems they
experience are with Access. They aren't. The problem is that they
are plunging ahead trying to realize a solution that they haven't
thought through to the end.
Read this, maybe print it and then turn away from your computer. At
least turn away from Access. You might use Word. I find it very
handy to use MS Word in Outline View to do this.
On paper or in a word processor describe as completely as you can the
problem that exists. Throw in everything you can think of that
relates to the problem space. Clean it up so that it makes sense.
That's your Problem Statement. Title it as such and print it.
Next create the Solution Statement which is sometimes called the
Product Specification. In that document name each problem as solved.
If there are problems in your Problem Statement that you are not going
to address, state that in the Product Specification so that your
goalposts don't keep moving on you.
The next document you need to create is the Functional Specification.
In the Functional Spec you list each problem and describe the strategy
you'll use to solve it.
Those three documents should be in existence and pretty well along
before you start addressing the tool(s) you'll use. They aren't cast
in concrete but they should become firmer as you go along. Later
stages of development in your application may cause you to go back and
change some parts of what has gone before. The more disciplined you
are about using the process the better you'll become and the better
the applications you'll deliver.
Next you'll try to identify all of the entities in play in your
application. You'll be surprised at how many entities there might be
in a simple application. All entities of a given type within the
scope of your application belong in one table. You may find the need
for lookup tables (not Lookup Fields) which hold lists of attributes
that often repeat in your application such as colors, cost accounts,
car manufacturers, etc.
By this point of the project you may be ready to turn to your
development tool.
I usually do my table designs in Access. Your mileage may vary.
I'll give your last issue one shot:
Assuming that you pretty well have your employee table designed and
that ClockNo is unique in your application and will serve as the
primary key.
the hours table will be about as described before but repeated and
modified here for clarity:
I recommend an autonumber Primary Key and a Foreign Key, usually of
the same name and always of the same datatype as ClockNo in the
Employee table.
this next assumes you are doing your data massaging from a properly
designed form. Do not get into the tables directly to massage data.
Once they're designed, use a form
(select from a combobox [on the form] on tblLaborAccount.You would have fields for
each other thing you are tracking at each instance and probably also
have a field for notes about this instance.Once your tables are designed, open the Relationships window, show the
two tables and draw a line from Employee!ClockNo to Hour!ClockNo.
Doubleclick the line you just drew. In the dialog that opens turn on
Enforce Referential Integrity and Enable Cascading Updates and
Deletes.
Create forms to massage the data. Although it will be more
intimidating to a newbie, I recommend binding a form to the Hours
table and save it with the name sufHours. Make that form just as
short as you can. Keep it down to the height of a text control if you
can. Set its display property to Continuous forms. Bind a much
larger form to the Employee table The controls for the Employee data
should be at the top of that form. Drag down the bottom of the form
to leave a huge empty space ending at the bottom of the form. Save
the form. Open it again in design view and size it so that you can
see the Database|Forms window. Click sufHours and drag it to the top
of the empty space on frmEmployee. You should now be able size
various things until you get what you want.
Try ALL of the above and post back in new threads as issues arise.
HTH & Welcome to Access,
--
-Larry-
--
I'm using Access 2003. I have only just setup the basic tables for the
moment, tblEmployees, tblShift & tblDepartment.
I think I understand what your saying, but can we breakdown how I would
keep track of how many hours have been used to cover an employees
sickness and possibly set up the required tables step by step.
tblEmployees
ClockNo
Firstname
Surname
ShiftID (from tblShift)
DeptID (from tblDepartment)
Could you tell me what I would require in the other tables by example