I would create a main form for each of the Staff and Projects data that can add,
and edit data to the related tables. After you have done this you will need to
pull data from both these tables when you create a a time entry. Creating the
first two forms may give you ideas and (i would bet) questions on how you are going
to get that data into your timeentry table.
So a staff Mainform and a project Mainform - Why do you need a subform on each?
You don't NEED them both, but having both will make it easy to see the time data from either angle... to see which projects and date/times a staff member worked on and to be able to see which staff and date/times worked on a project.
Without two mainforms, you would run into complications with adding either Staff members or Projects.
Linking the subform is the easy part. All you need to do there is either:
* Use the Control Wizard to place the subform and let it guess the link.
* Set the Link Master and Link Child field properties to the appropriate fields (both ProjectID on the Project mainform or both StaffID on the Staff mainform).
Its good practice to Never let user access tables directly. And this is when the
"Never say Never" saying will never apply.
Just to be clear that is never let user access tables directly this can lead to all sorts
of problems and loss of control of data stored in your database.
By using forms you can control information that is added to tables.
The Pirmary key will be for ProjectID and StaffID in the Project and Staff table. This will
be unique. You will have mulitple entries against projects and for staff members but these will
go in your timeentry table. The timeentry table will pull the ProjectID (that will be unique)
and StaffID (that will be unique) into the table and assign the date and times work has been
carried out on those projects.
On your time entry form I would use the wizard to create this and choose the timeentry table.
To get ProjectID/Project Name and StaffID/Staff name I would look at the Combo box facility.
Select the Combo box from the toolbox and make sure the Control Wizard is depressed as this
Yeah, my bad... the primary key for the Time table should be StaffID, ProjectID and at least StartDate. I guess you could also use a TimeID as AutoNumber for the primary key as well, which would free up data that can be entered and reduce other complexities down the track.