Time/Date and Table structure question (1 Viewer)

Franky G

Registered User.
Local time
Today, 17:06
Joined
Feb 6, 2001
Messages
62
Hi,

I have an 'Events' Database in which I'm trying to record time spent by various staff members at each event.

tables; tblAppDetails, tblEmployee, tblHours

I have already made a good start on the main input form, but need some help of the employee/hours sub-form.

It's a relationship question I suppose, but what I'm trying to do is select an employee from a drop down list, then record the date they attended the event, start time, end time, breaks? and total time. The total time would have to be calculated so how would I go about that? Would I be able to use the Datediff function here?

Main problem is the relationships between the tables;
Each Event can be attended by many staff,
Each staff member can attend on multiple days

I'm so bad at relationships, any pointers on tables, primary fields etc would be very helpful!

Thanks for any help!
FrankyG
 

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 12:06
Joined
Dec 26, 2002
Messages
4,751
To obtain total time you could use this format...

TotalTime: Format(([endtime]-[starttime])*24,"#.00")

I use this in many databases I have created.

If you need to make further calculations to this you will have to make it an Integer if this is a query.

Int([endtime]-[starttime])*24

And then when using it, you will have to give it a format in order to stop it from being too long.

Hope that helps,

Vassago
 

Users who are viewing this thread

Top Bottom