Jamie,
I've used Single data type to handle currency for many years, with no
problems. I just control the division and multiplication to two decimal
places.
Regarding the holiday calculation... may I offer a real world problem,
and we can then compare our solutions.
Using a Holiday table....
Client says that a product can be fabricated in 9 (DaysToWeave) days, and
needs to know the fabrication completion date (from some given StartDate).
Holidays and weekend days are to be skipped.
I just add one day to the StartDate (TempDate), and check if TempDate is
a Holiday (according to the table), or if Weekday(TempDate) = 1 or 7, and
loop until WorkDays = 9.
Do Until WorkDays = DaysToWeave
TempDate = Me.StartWeave + Ctr
If IsNull(DLookup("[HolidayDate]", "tblHolidays", "HolidayDate = " &
TempDate))
And WeekDay(TempDate) <> 7 And WeekDay(TempDate) <> 1 Then
WorkDays = WorkDays + 1
Ctr = Ctr + 1
Else
Ctr = Ctr + 1
End If
Me.EndWeave = TempDate
Loop
Would you share your code to handle this problem?
I'm particularly interested in holidays such as Christmas and New Year,
where... if those holidays fall on a Tuesday, Monday would "probably" be
included as a holiday that year, and if it falls on Thursday, Friday would
also be a holiday that year. If those holidays fall in mid week, it's
probably a toss-up as to which day each client might assign.
Also, many clients can have "holidays" that are specifically thier own,
(retooling, inventory, religious, etc..) where there is no production. A
holiday table would make it simple to incorporate those dates.
Also, the issue of "ortability"come into play. The holiday table could
be used in Canada, or England. etc...
Taking into consideration that many OPs in the Access newsgroups are not
experienced Access programmers, I feel my solution is much easier to
understand and implement, and is accurate. My client supervisors have no
problem maintaining a yearly updated Holiday table.
Microsoft also suggests
http://support.microsoft.com/kb/210064
By the by, one "very minor" point. If you initiate a post to a "top"
poster, please use a top post, and vice versa. It just makes the flow of
the discussion easier to understand (within that particular thread).
Thanks...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."