Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assistance with User-Defined Function call with Array variable 1

Status
Not open for further replies.

AustinMan

Technical User
Feb 26, 2003
40
US
I am trying to Update a table with a user-defined function using this below.

Code:
 DoCmd.RunSQL "UPDATE tblTickler SET tblTickler.DueDate=dhAddWorkDaysA(10,[tblTickler]![SignedForOn],[b]Array(#10/08/2007#,#11/12/2007#))"/b

dhAddWorkDaysA is a function taken from MVP/ Access revised from VBA Handbook to get next workday with array of holidays. (found on mvps.org/access) - Date/Time - Doing WorkDay Math in VBA hyperlink.

I am at a lost when stepping thru and Array function errors out in VBA.

How can I update this with Array function in Design view ?
 
SQL don't like arrays, period.
You may try to revise your function to deal with ParamArray (look at the VBA help)

Another (safer IMO) way is to have a table of holidays ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top