B
Brandy via AccessMonster.com
A user inputs when cabinets for a specific customer need to be delivered into
a form. All the header information is added. Customer, entry date, phase, etc.
They also select a checkbox at the header level if the job has a special
color.
There is a subfrm where the user input the detail for that job. Lot number,
species, door style, and when that lot is due to be delivered.
So when the user inputs the lot delivery date (LotDelDate) then I would like
the database to calculate when we should start building the cabinets. This
start date is also based on some of the other criteria entered into the form.
The code is listed below. Everything works except when determining if the job
is a special color. I would also like the start date to skip weekends.
Can anyone help me out?
Private Sub LotDelDate_AfterUpdate()
If Me.DoorStyle = "Eagle" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-9" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "H/E" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "F/E" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-9" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-22" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-23" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Forms!FRMDELIVERY.Form.SpecialColor = "YES" Then
Me.WOSD = Me.LotDelDate - 6
Else
Me.WOSD = Me.LotDelDate - 4
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
a form. All the header information is added. Customer, entry date, phase, etc.
They also select a checkbox at the header level if the job has a special
color.
There is a subfrm where the user input the detail for that job. Lot number,
species, door style, and when that lot is due to be delivered.
So when the user inputs the lot delivery date (LotDelDate) then I would like
the database to calculate when we should start building the cabinets. This
start date is also based on some of the other criteria entered into the form.
The code is listed below. Everything works except when determining if the job
is a special color. I would also like the start date to skip weekends.
Can anyone help me out?
Private Sub LotDelDate_AfterUpdate()
If Me.DoorStyle = "Eagle" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-9" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "H/E" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "F/E" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-9" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-22" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Me.DoorStyle = "RP-23" Then
Me.WOSD = Me.LotDelDate - 5
Else
If Forms!FRMDELIVERY.Form.SpecialColor = "YES" Then
Me.WOSD = Me.LotDelDate - 6
Else
Me.WOSD = Me.LotDelDate - 4
End If
End If
End If
End If
End If
End If
End If
End If
End Sub