W
Welthey
I am trying to create an MDE file and I'm getting an error on the following
code. I'm getting a Complile Error on the following code. I'm not quite
sure where to go from here. Is the code not compatible with the MDE file.
I'm new to Access so I am not sure what is really wrong. Can some please
advise on how to proceed. Thank you.
Private Sub Days_Out_Of_Compliance_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_WorkingDays
Dim intCount As Integer
StartDate = StartDate + 3
intCount = 0
Do While StartDate <= EndDate
Select Case Weekday(StartDay)
Case Is = 1, 7
intCount -intCount (I get the compile error on this line.)
Case Is = 2, 3, 4, 5, 6
intCount = intCount + 1
End Select
StartDate = StartDate + 3
Loop
WorkingDays = intCount
Exit_WorkingDays:
Exit Function
Err_WorkingDays:
Select Case Err
Case Else
MsgBox Err.Description
Resume Exit_WorkingDays
End Select
End Function
End Sub
code. I'm getting a Complile Error on the following code. I'm not quite
sure where to go from here. Is the code not compatible with the MDE file.
I'm new to Access so I am not sure what is really wrong. Can some please
advise on how to proceed. Thank you.
Private Sub Days_Out_Of_Compliance_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_WorkingDays
Dim intCount As Integer
StartDate = StartDate + 3
intCount = 0
Do While StartDate <= EndDate
Select Case Weekday(StartDay)
Case Is = 1, 7
intCount -intCount (I get the compile error on this line.)
Case Is = 2, 3, 4, 5, 6
intCount = intCount + 1
End Select
StartDate = StartDate + 3
Loop
WorkingDays = intCount
Exit_WorkingDays:
Exit Function
Err_WorkingDays:
Select Case Err
Case Else
MsgBox Err.Description
Resume Exit_WorkingDays
End Select
End Function
End Sub