Basically on whatever event you want to use to detect the update on the text box, you would push the current date to a text box bound to a field to store it. Do not allow updates on this text box containing the date by the users.
! more thing is can it be done in this way like morning before 12pm when people login to the database and it prompt up a msgbox "Good Morning" then after 12pm login people it'll prompt "Good Afternoon" and so on... Can it be done?
I've written a code but it seen work to be can you check for me is this correct?
code:
__________________________________________________
Private Sub Form_Load()
If Text51.Value >= "12:00 AM" Then
MsgBox "Good Morning!!", vbOKOnly, "Welcome"
ElseIf Text51.Value <= "12:00 PM" Then
MsgBox "Good Afternoon!!", vbOKOnly, "Welcome"
ElseIf Text51.Value >= "6:00 PM" Then
MsgBox "Good Evening!!", vbOKOnly, "Welcome"
End If
End Sub
__________________________________________________
If Time() > TimeSerial(18, 0, 0) Then
MsgBox("Good Evening")
ElseIf Time() > TimeSerial(12, 0, 0) Then
MsgBox("Good Afternoon")
Else
MsgBox("Good Morning")
End If