Im a novice vb programmer so id like to say in advance thanks for the help. Heres my problem...I have a form with a combo box that has a drop down menu with the following 1 Day, 4 Days, and 10 Days. What i want to do is once the user selects a day the following happens. If the user selects 1 Day it will put the current date in my next text box on the form called susp act date. there is a field in my table with the same name. If they select 4 Days it will add 4 days to the current date and again place it in the next text field (susp act date) and if its 10 Days it will add 10 days to the current date. Ive tried using the afterupdate to make this happen and im getting no where. here is the code:
Private Sub Combo36_AfterUpdate()
If [Table1].[Susp Days] = "1 Day" Then
[Table1].[Susp Act Date] = Date
End If
If [Table1].[Susp Days] = "4 Days" Then
[ Table1].[Susp Act Date] = Date + 4
End If
If [Table1].[Susp Days] = "10 Days" Then
[ Table1].[Susp Act Date] = Date + 10
End If
End Sub
The susp date is the field in the table where the choice from combo box is put. Am i using the wrong process because im using afterupdate? Im getting the following error:
Microsoft access cannot find the field 'l' referred to in your expression
i thought this would be a simple deal but its not looking like it...at least for me...again any help would be greatly appreciated.
Private Sub Combo36_AfterUpdate()
If [Table1].[Susp Days] = "1 Day" Then
[Table1].[Susp Act Date] = Date
End If
If [Table1].[Susp Days] = "4 Days" Then
[ Table1].[Susp Act Date] = Date + 4
End If
If [Table1].[Susp Days] = "10 Days" Then
[ Table1].[Susp Act Date] = Date + 10
End If
End Sub
The susp date is the field in the table where the choice from combo box is put. Am i using the wrong process because im using afterupdate? Im getting the following error:
Microsoft access cannot find the field 'l' referred to in your expression
i thought this would be a simple deal but its not looking like it...at least for me...again any help would be greatly appreciated.