T
Tony
Hi All,
I have a table that has a column I'd like to populate based on the result of
running a function through an update query. Don't know if this can be done,
but here goes...
The column (Success) has three possible values, Yes, No, and NA. I envision
having three similar queries that add one of these values based on the
following:
1) If a date (StartDate) + 5 working days is greater than a second date
(CompDate), then Success = Yes
2) If StartDate + 5 is less than CompDate, then Success = No
3) If there is no CompDate, then Success = NA
I have a function that works when used in a form, to determine which days
are working days, including days we define as holidays. It takes as input:
working days (Long) 'in this case, working days = 5
start date (Date) 'StartDate
holidays (Variant) 'the dates are stored in an array,
holidays=Array(#1/1/2004#, #7/4/2004#, #12/25/2004#)
The problem I'm running into is that I don't know how (or if) I can get this
array of holidays into the function when it's used in the query. No matter
how I try to enter the dates, I get a Data Type Mismatch error.
If anyone can point me in the correct direction, I'd much appreciate it.
It'll save me a lot of time.
Thanks in advance & Ciao,
Tony
I have a table that has a column I'd like to populate based on the result of
running a function through an update query. Don't know if this can be done,
but here goes...
The column (Success) has three possible values, Yes, No, and NA. I envision
having three similar queries that add one of these values based on the
following:
1) If a date (StartDate) + 5 working days is greater than a second date
(CompDate), then Success = Yes
2) If StartDate + 5 is less than CompDate, then Success = No
3) If there is no CompDate, then Success = NA
I have a function that works when used in a form, to determine which days
are working days, including days we define as holidays. It takes as input:
working days (Long) 'in this case, working days = 5
start date (Date) 'StartDate
holidays (Variant) 'the dates are stored in an array,
holidays=Array(#1/1/2004#, #7/4/2004#, #12/25/2004#)
The problem I'm running into is that I don't know how (or if) I can get this
array of holidays into the function when it's used in the query. No matter
how I try to enter the dates, I get a Data Type Mismatch error.
If anyone can point me in the correct direction, I'd much appreciate it.
It'll save me a lot of time.
Thanks in advance & Ciao,
Tony