Can't Get LATE

Maxine Nietz 1 Reputation point
2024-12-09T20:18:57.5666667+00:00

I have a database with a continuous form. Access365. If the due date is changed and is larger than the required date, I want the Status field to say "LATE." Here is my code:

Private Sub DueDt_AfterUpdate()

Me!UpdatedOn = Date

Me.Refresh

End Sub

Private Sub DueDt_Dirty(Cancel As Integer)

Dim result As Integer

OldVal = Me!DueDt

result = MsgBox("ARE YOU SURE??", vbCritical + vbYesNo, "US Welding")

If result = 7 Then

    Me!DueDt = OldVal

    SendKeys "{ESC}"

Else

    If Me!DueDt > Me!ReqDt Then

        Me!Status = "LATE"

    Else

        Me!Status = ""

    End If

End If

End Sub

Everything works except the Me!Status = part. I followed a microsoft video that told me to add the line me.refresh in the after update of the due date, but it is not working. I have tried requery, refresh, save, moving off the record and back again. Nothin work!!!!!

What is the solution!!!!!!!!!!

Access
Access
A family of Microsoft relational database management systems designed for ease of use.
420 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.