Combo Box value updates a field in table with date? afterupdate?

excuse my ignorance please but wouldnt i have to store those dates and run the query? we will be entering dates everyday and need to keep track of them?
Wait a minute. I just had a revelation. Yes, you might need to store those dates as it is based on TODAY'S date. So, forgive me. We would need to use the combo's after update event to save the date to the field you wanted. So, reset the control source of the text box back to the field and then change the combo's after update event to this:

Code:
Private Sub Combo36_AfterUpdate()
    Select Case Me![Susp Days] 
        Case "1 Day" 
            Me![Susp Act Date] = Date
        Case  "4 Days"
            Me![Susp Act Date] = DateAdd("d", 4, Date)
        Case "10 Days"
            Me![Susp Act Date] = DateAdd("d",10,Date)
    End Select
End Sub
 
AWESOME! that works great! now on to my report adventure with turning these things red....LOLOL SOS you ROCK!
 
Glad it works for you and sorry for the trouble getting you there. But hopefully you understand why and how you do not normally store data like this but in this case we had to because we were using DATE which is today, and if the formula used Date tomorrow then the date for the field would be wrong. But if we had a static date that we were basing this off of, then we would store that static date.

So, if we stored today's date instead, we wouldn't store the calculated date, but since we aren't storing today's date, then we need to. :)
 
Got an easy way in mind that i can make those dates red in the report prior to the date ex: 1 day is red instantly, 4 days gets red on the third and 10 days gets red on the 8th day from when they were entered in the susp act date field in table1.
 

Users who are viewing this thread

Back
Top Bottom