If the two dates are without time (ie, time is 00:00:00), then
1+ date2 - date1
give the number of days between the two dates (you may remove the +1 if you
want exclusive rather than inclusive).
You could also used:
1 + DateDiff("d", earliestDate, latestDate).
Next, to get the number of Sunday, between two dates, none of the date being
itself a Sunday, you can use:
DateDiff("ww", earliestDate, latestDate, vbSunday)
and to get the number of Saturday:
DateDiff("ww", earliestDate, latestDate, vbSaturday)
So, in a query, in the query designer, in the grid, add the computed
expression:
1 + DateDiff("d", earliestDate, latestDate) -DateDiff("ww",
earliestDate, latestDate, 1)-DateDiff("ww", earliestDate, latestDate, 7)
That works only if none of the date is a Saturday, neither a Sunday.
Hoping it may help,
Vanderghast, Access MVP