G
Guest
Access 2000
Two text boxes: DD and dueDate
I have a public function in a standard module that will account for
weekends. I want to enter 1/7/06 in the DD textbox, add 9 months to it, move
up to the next weekday and have 10/9/06 result in the dueDate textbox. The
function works in the Immediate Window, but how do I call it after entering
the date in the DD texbox.
I know this is a dumb question!
Here is the function:
Public Function CalcdueDate(DD As Date) As Date
Dim dueDate As Date
dueDate = DateAdd("m", 9, DD)
Select Case Weekday(dueDate)
Case 1
dueDate = dueDate + 1
Case 7
dueDate = dueDate + 2
End Select
CalcdueDate = dueDate
End Function
Thanks,
Two text boxes: DD and dueDate
I have a public function in a standard module that will account for
weekends. I want to enter 1/7/06 in the DD textbox, add 9 months to it, move
up to the next weekday and have 10/9/06 result in the dueDate textbox. The
function works in the Immediate Window, but how do I call it after entering
the date in the DD texbox.
I know this is a dumb question!
Here is the function:
Public Function CalcdueDate(DD As Date) As Date
Dim dueDate As Date
dueDate = DateAdd("m", 9, DD)
Select Case Weekday(dueDate)
Case 1
dueDate = dueDate + 1
Case 7
dueDate = dueDate + 2
End Select
CalcdueDate = dueDate
End Function
Thanks,