Combo Box Calculations

  • Thread starter Gaetanm via AccessMonster.com
  • Start date
G

Gaetanm via AccessMonster.com

I have a database that is a job time tracking. I have the DateDiff down I
have a query
that gives me the time for the present week in hh:nn, and total minutes.
I would like to have a text box that would show the accumulated work time
for this week. The query has EmployeeId, StartTime, StopTime, TotalTime,
TotalHoursMinutes,
On my form I have a combo box that gives me employeeID. This info comes from
the Employee Table. I would like to have a Text box on the form that would
give me the total hours he has logged plus Now() the employeeid comes from
the combo box.

I would like the employee at anytime to pull down the combo box get the
EmployeeID
In the TEXT box auto-add the time from StartDate – Stopdate plus if there is
a Startdate without a StopDate add that Startdate – Now()


Can anyone please help

Gaetanm
 
D

Douglas J. Steele

Since StopDate may be Null, rather than populated, you can use the Nz
function (Nz([StopDate], Now())) instead of simply [StopDate]
 
G

Gaetanm via AccessMonster.com

Douglas said:
Since StopDate may be Null, rather than populated, you can use the Nz
function (Nz([StopDate], Now())) instead of simply [StopDate]
I have a database that is a job time tracking. I have the DateDiff down I
have a query
[quoted text clipped - 18 lines]
Thanks for the quick responce Steve.
But how would I get the EmployyeID Variable from the combo Box
because I'm just looking at that perticular employee and then in my
query I have total minutes minus the Null stopdate.
how do I total the minutes add the last StartDate {Null StopDate} in minutes
to the NZ function?

Gaetanm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top