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!

Help with code

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.

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

dhAddWorkDaysA is a function taken from MVP/ Access revised from VBA Handbook to get next workday with array of holidays.

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

How can I update this with this array listed?

Thanks!
 
I am not just taking the code as my own but modifying it for this particular use - I left the proper owner declarations in the comments.

Can anyone help me with this problem? I am trying to update the Date using this function call and have tried Array(Date1, Date2,Date3) and have unsuccessfully step thru the code with no success. I am using MS Access 2000.

Any assistance would be very appreciated. Is this the appropriate forum or is VBA Visual Basic of Applications a more appropriate forum.
 

CurrentDB.Execute "UPDATE tblTickler SET DueDate= dhAddWorkDaysA(10, [SignedForOn], Array(#10/08/2007#, #11/12/2007#))


You don't show what dhAddWorkDaysA is supposed to be feed with so I took a lucky guess
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top