Update

dream

Registered User.
Local time
Today, 21:36
Joined
Sep 3, 2003
Messages
38
Hi,

I wanna do a text box that whenever you update the data it'll show the last date of the data that u key in. Can this be done?
 
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?
 
dream,

On a form's OnOpen event, you can put:

Code:
If InStr(1, Now(), "PM") > 0 Then
   MsgBox ("Good afternoon")
Else
   MsgBox("Good Morning")
End If

Wayne
 
Wayne,

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
__________________________________________________
 
dream,

That won't do, you are comparing strings.

Code:
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

Wayne
 
Wayne,

Ok then i've to change the code... Thanks alot!!
 

Users who are viewing this thread

Back
Top Bottom