E
Eric D. Braden
First post here (and somewhat new to Access), so let me know if I
should post this question elsewhere. (I'm unsure what daovba is)
My colleague and I are trying to calculate the number of days between
two events. We're using the code found here: http://www.mvps.org/access/datetime/date0006.htm
(the second example). There are two categories, though, and one of
them doesn't have the "startdate." It works just fine for the one
category (Advertised) which has the startdate (Closing Date) and the
end date. However, the other category (Continuous) has no value in
the startdate field and returns #error. We'd like it to return a
value of zero.
I'm probably being a little unclear
In our table, one of the
fields is "Type." The type "Advertised" has a Closing Date
(startdate), while the type "Continuous" does not, the field is
empty. Is there a default value we should go with? I'm not a huge
fan of how tacky bogus dates look (like 01/01/1901 or 12/31/2099), is
there another way to do it?
We're trying to tinker with it but are inexperienced. The best I've
come up with so far is plugging the following in before the If
statements, but it doesn't work:
If Weekday(StartDate) <= 0 Then WorkingDays2 = 0
Else
Any suggestions?
should post this question elsewhere. (I'm unsure what daovba is)
My colleague and I are trying to calculate the number of days between
two events. We're using the code found here: http://www.mvps.org/access/datetime/date0006.htm
(the second example). There are two categories, though, and one of
them doesn't have the "startdate." It works just fine for the one
category (Advertised) which has the startdate (Closing Date) and the
end date. However, the other category (Continuous) has no value in
the startdate field and returns #error. We'd like it to return a
value of zero.
I'm probably being a little unclear
fields is "Type." The type "Advertised" has a Closing Date
(startdate), while the type "Continuous" does not, the field is
empty. Is there a default value we should go with? I'm not a huge
fan of how tacky bogus dates look (like 01/01/1901 or 12/31/2099), is
there another way to do it?
We're trying to tinker with it but are inexperienced. The best I've
come up with so far is plugging the following in before the If
statements, but it doesn't work:
If Weekday(StartDate) <= 0 Then WorkingDays2 = 0
Else
Any suggestions?