G
GerryE
I have a form that schedules the "RequestedDate" field in a subform for 4
work days ahead of the current date. I am having trouble making the event
procedure look in a Holiday table. The name of the table is Holidays and the
column is Holdate. If the Requested date matches the holdate, increase the
requested date by 1. Can anybody help? Here is part of the code I am using.
Your help is greatly appreciated.
Private Sub Quote_Status_AfterUpdate()
If Me![QuoteStatus] = "LDS" Then
If MsgBox("Do You want to update the requested date? Select no to Cancel.",
vbYesNo, "Exit?") = vbYes Then
Me![tblQuoteLog subform]![LDS] = Date
If Me![tblQuoteLog subform]![TTime] > #11:45:00 AM# Then
Me![tblQuoteLog subform]![LDS] = Date + 1
End If
If Me![tblQuoteLog subform]![DatePrt] <= 2 Then
Me![tblQuoteLog subform]![RequestedDate] = Me![tblQuoteLog
subform]![LDS] + 4
ElseIf Me![tblQuoteLog subform]![DatePrt] >= 3 Then
Me![tblQuoteLog subform]![RequestedDate] = Me![tblQuoteLog
subform]![LDS] + 5
End If
Me![tblQuoteLog subform]![Designer] = "LDS"
Me![tblQuoteLog subform]![Drawing Done] = True
Else
'Do Nothing
End If
work days ahead of the current date. I am having trouble making the event
procedure look in a Holiday table. The name of the table is Holidays and the
column is Holdate. If the Requested date matches the holdate, increase the
requested date by 1. Can anybody help? Here is part of the code I am using.
Your help is greatly appreciated.
Private Sub Quote_Status_AfterUpdate()
If Me![QuoteStatus] = "LDS" Then
If MsgBox("Do You want to update the requested date? Select no to Cancel.",
vbYesNo, "Exit?") = vbYes Then
Me![tblQuoteLog subform]![LDS] = Date
If Me![tblQuoteLog subform]![TTime] > #11:45:00 AM# Then
Me![tblQuoteLog subform]![LDS] = Date + 1
End If
If Me![tblQuoteLog subform]![DatePrt] <= 2 Then
Me![tblQuoteLog subform]![RequestedDate] = Me![tblQuoteLog
subform]![LDS] + 4
ElseIf Me![tblQuoteLog subform]![DatePrt] >= 3 Then
Me![tblQuoteLog subform]![RequestedDate] = Me![tblQuoteLog
subform]![LDS] + 5
End If
Me![tblQuoteLog subform]![Designer] = "LDS"
Me![tblQuoteLog subform]![Drawing Done] = True
Else
'Do Nothing
End If