Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Overflow Error 6 in CountBusinessDays function on 1

Status
Not open for further replies.

JimWho

Vendor
Apr 2, 2002
16
0
0
CA
I am using a function which counts business days and takes holidays into consideration. I am using Access 2000 in Canada if that means anything re dates.

When I get the error message I select debug and it takes me to this line "dteTemp = dteTemp +1" when I point my mouse pointer over it this is displayed "dteTemp = 9999/12/31 10:14:29 AM"

dteTemp is defined in the DIM statement as a Date.

I am a beginner so I am just learning this stuff now, but I am at my wits end as to how to fix. Can you help?
 
Something is either wrong with your function or one of the values it uses. You're getting the error because you are attempting to add 1 day to the 31 Dec 9999. The system can't handle any dates beyond the year 9999.
 
see faq181-261, but be aware that all dates used in Ms. A. queries must be in U.S. date format -regardless of the locale settings. It APPEARS that the date format in your procedure is 'yyyy/mm/dd' - which is a bit off from the expected/requirement (mm/dd/yy or mm/dd/yyyy).

W/o recourse to the complete function you are using, and at least a sample of the arg(s), additional 'review' doesn't seem to be useful.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top