Hi
1. I have a date calculation function that calculates dates excluding weekends & holidays & also calculates the difference in two dates excluding weekends & holidays.
2. I am busy testing a query that has 30 date fields. 6 of the dates are from an existing table and the remaining are calculated date fields (which use the function).
3. I also have 4 status (delayed, completed, etc) fields that are created/calculated using the dates.
My problem:
The query runs OK. Its not super fast and I would like to speed it up. The BIG problem though is that after the query runs and I'm in datasheet view, the whole query just completely bogs down. If I try and click in any field or even try and scroll left/right to see the results it just hangs. It takes forever to scroll just one click.
I have tried creating a form from the query and that is even worst. If I click in a field it takes forever to populate the fields and if I decide to click in another field then it just gets worst. It seems that the function is either constantly running or recalculating the entire SQL code everytime I click anywhere.
I have attached the code for the function.
I hope I am making sense - Im a novice user. Please be patient.
Regards
Archie