Unanswered: Update # of Days without Weekends in Table
Hello, I am trying to loop through a table to have the difference between the AssignedDate and CompletionDate assigned to TimeToComplete. I want the TimeToComplete to ignore weekends and holidays. I have a table (tbl_Holiday) that has a column with every day though 12/31/2010 and a column that has a check mark (yes) for weekends and holidays. When the code runs, I get the following error: Runtime error '2001': You canceled the previous operation. The problem occurs when trying to assign a Dcount value to WorkingDays.
Here is my code:
Private Sub Form_Load()
Dim DB As Database, RS As Recordset
Dim StartDate As Date, EndDate As Date, WorkingDays As Integer
Set DB = CurrentDb()
Set RS = DB.OpenRecordset("tbl_Work", dbOpenDynaset)
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.