M
Moses
Yes there was some misspelling going on that has been corrected using the
code given by Douglas. My problem now is that I cannot get the query to call
the function I still get the following message:
Undifined Function, 'CalcWorkDays' in expression
My query is using the following code:
Here is the SQL code behind my query:
SELECT MTGLIBP1_CHMSTR01.[ACCT#], MTGLIBP1_CHMSTR01.INTPTD,
MTGLIBP1_CHBKRPCY.BKDISR, MTGLIBP1_CHBKRPCY.BKCLOS
FROM MTGLIBP1_CHBKRPCY INNER JOIN MTGLIBP1_CHMSTR01 ON
MTGLIBP1_CHBKRPCY.[ACCT#] = MTGLIBP1_CHMSTR01.[ACCT#];
I am inserting the following code in a blank field in my query to use the
function:
=CalcWorkDays(BKDISR, BKCLOS)
which should count the number of business days between the BKDISR and BKCLOS
date fields.
This is not happening does any one have any further suggestions. Sorry for
all the trouble.
code given by Douglas. My problem now is that I cannot get the query to call
the function I still get the following message:
Undifined Function, 'CalcWorkDays' in expression
My query is using the following code:
Here is the SQL code behind my query:
SELECT MTGLIBP1_CHMSTR01.[ACCT#], MTGLIBP1_CHMSTR01.INTPTD,
MTGLIBP1_CHBKRPCY.BKDISR, MTGLIBP1_CHBKRPCY.BKCLOS
FROM MTGLIBP1_CHBKRPCY INNER JOIN MTGLIBP1_CHMSTR01 ON
MTGLIBP1_CHBKRPCY.[ACCT#] = MTGLIBP1_CHMSTR01.[ACCT#];
I am inserting the following code in a blank field in my query to use the
function:
=CalcWorkDays(BKDISR, BKCLOS)
which should count the number of business days between the BKDISR and BKCLOS
date fields.
This is not happening does any one have any further suggestions. Sorry for
all the trouble.
John Vinson said:Thanks Douglas,
That code worked and I understood what you meant about First day being part
of the comment. However, I am still getting my first message:
Undifined Function, 'CalcWorkDays' in expression
Here is the SQL code behind my query:
SELECT MTGLIBP1_CHMSTR01.[ACCT#], MTGLIBP1_CHMSTR01.INTPTD,
MTGLIBP1_CHBKRPCY.BKDISR, MTGLIBP1_CHBKRPCY.BKCLOS
FROM MTGLIBP1_CHBKRPCY INNER JOIN MTGLIBP1_CHMSTR01 ON
MTGLIBP1_CHBKRPCY.[ACCT#] = MTGLIBP1_CHMSTR01.[ACCT#];
and I used the code you gave me for the module.
Earlier you said you had
In the TotalDays field in control source I have
=CalcWorkDays(Me.txtStart,Me.txtEnd)
and that you were getting an error "argument not optional". This could
happen if either txtStart or txtEnd were NULL.
If you're still getting the Undefined Function error, then perhaps
either you have a misspelling somewhere, or the function is defined as
Private Function rather than Public Function in your Module.
John W. Vinson[MVP]