comparing dates against dates held in variants

Surely the example I've posted contains a module and demonstrates how the function is called within a query?
 
dates

Hi,

Sorry I haven't been able to unzip the file and take a look yet. My reply (I thought) was to a post where you had just written the code!!

Thanks for your prompt reply anyway, I'll call again when I need more help!

Have a nice day

:)

-------------------------------------------
St*rlight
Let the St*rs shine bright!
 
My concern is as the database grows, ........ it would be quicker to load all holiday dates from the holiday table into an array.

But I can't make this work. Because of a data missmatch
When I put your code in the attached Access 2000 DB and ran the query, it did not throw up any error.

I also found that this line could work with or without the CDate() function:-
If (CDate(varDates) = dtmCurrent) Then blmIsHoliday = True
If varDates = dtmCurrent Then blmIsHoliday = True

The code was fast. On the WinMe system I used, it took less than two seconds to return the query results for 1500+ records.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom