Date module

AndyCompanyZ

Registered User.
Local time
Today, 18:52
Joined
Mar 24, 2011
Messages
223
I have a quick question I am trying to call a module (clsWorkingDays) and calculate 7 days before another date. this is my first attemot at module use and I'm not sure what i'm doing so far I have;

Code:
Dim clsWorkingDays As Workdays
 Set Workdays = New Workdays
 
If Me.cmboCommunicationName.Value = 1 Then
 Me.CommunicationDueDate = WorkingDays([EventStartDayDate], -7)
End If

What I'm trying to do is take away 7 working days from the EventStartDate. But this gives a "user defined type not defined error" and points to the first line.I have been reading about modules but they all assume a prior knowledge and I just want a basic way to learn.
 
I am experimenting and now have:

Dim Workdays As New clsWorkingDays
If Me.cmboCommunicationName.Value = 1 Then
Me.CommunicationDueDate = WorkingDays([EventStartDayDate], -7)
End If

But this gives me a expected variable or procedure not module error
 
Aha made a bit of progress now have;

Dim Workingdays As New clsWorkingDays
If Me.cmboCommunicationName.Value = 1 Then
Me.CommunicationDueDate = Workingdays(Forms![frmMainNavigation]![NavigationSubform].Form![EventStartDayDate], -7)
End If

But now it gives me "object doesn't support this method " error.
 

Users who are viewing this thread

Back
Top Bottom