You've got two calculations for 'Form2.'
If Form2 is Selected then "NextThruDate"="LastThuDate+395
If Form2 is Selected then "NextThruDate"=Date (Now)+30
Is the last line supposed to be 'Form3?'
Assuming this to be true...first you need to, in Form Design View
- Select the TypeOfForm Combobox
- Go to Properties - Data and make the Combobox Unbound by deleting its Control Source
- Go to Properties - Event
- Click on the AfterUpdate property to go to the code module
- Add the code below
Code:
Private Sub TypeOfForm_AfterUpdate()
Select Case TypeOfForm
Case 1 'Form1 selected
Me.NextThruDate = DateAdd("d", 365, Me.LastThruDate)
Case 2 'Form2 selected
Me.NextThruDate = DateAdd("d", 395, Me.LastThruDate)
Case 3 'Form3 selected
Me.NextThruDate = DateAdd("d", 30, Me.LastThruDate)
End Select
End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007