Question/Problem w access (updated)

zendari

Banned
May 27, 2005
6,558
0
0
Alrite, I have a 2nd question for the gurus here.

I have a list of steps in a process for production. Each step takes a given amount of time (ie 0:30, 2:15, 10:36, etc). I am trying to sum up the total time for the entire process. However, when I try to use the totals summation, it only sums up to 24 hours then loops around at starts at 0 again.

I found a link to a module that does something similar, but I don't know how to alter it to do what I want.

text

TIA






Hey there,

I am working for a tech company that processes silicon wafers. We use an Access database to keep track of the time it takes to process, so we can determine how long they take to complete for future reference.

Occasionally, a lot may go on hold. What this means is that all work is stopped for a given reason. Later it goes off hold and work is resumed.

We are trying to use querys to find out the total days of work involved for a lot that goes on hold. Our expressions are the following:

date started is inputted
date finished is inputted
date on hold (if applicable) is inputted
date off hold (if applicable) is inputted

Total time = finished - started - (offhold - onhold).

It works fine assuming a lot goes on hold. However, if it never goes on hold, we are having trouble inputting default values into the onhold and offhold columns. If a lot doesn't go on hold, off-on should = 0, it does't matter what the values are.

We have tried the default value option in both the row of the table in design view, and the input form in design view, and neither works. Any assistance is appreciated, TIA.

The default value works for any new records formed from that point on, we are trying to change all existing records as well that don't have any values as this database is really a work in progress. The data is in date/time format.
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
You need to check for NULL dates and act on them.

If dateonhold Is NULL then return 0


do you have a select statement you are working on that you could post for modification?

without seeing the SQL statement you might look to using the IsNull() statement in VBA code
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
convert the time to actual seconds and store as a number.