AndyCompanyZ
Registered User.
- Local time
- Today, 19:58
- Joined
- Mar 24, 2011
- Messages
- 223
I have a module for a form that produces the above error. I can see why it does but can anyone tell me how to get around this The code is
Private Sub Form_Current()
Me.Form.DurationDays = DateDiff("d", [EventStartDay], [EventEndDate] + 1)
Me.Form.EventDurationHours = DateDiff("h", [EventEndTimeDay1], [EventStartDay1])
End Sub
I can see that it is calling 2 procedures but I need both on the form but if I call them as 2 separate ones it won't work either. Can anyone tell me what to do please. Do I need to make them public functions in which case how do I do that.
Thanks in advance
Andy
Private Sub Form_Current()
Me.Form.DurationDays = DateDiff("d", [EventStartDay], [EventEndDate] + 1)
Me.Form.EventDurationHours = DateDiff("h", [EventEndTimeDay1], [EventStartDay1])
End Sub
I can see that it is calling 2 procedures but I need both on the form but if I call them as 2 separate ones it won't work either. Can anyone tell me what to do please. Do I need to make them public functions in which case how do I do that.
Thanks in advance
Andy