I designed a welcome form that will have 3 labels set their visiblity to False and wrote a code (based on example in a web page, so it is not mine I have to say), to check for current time and display label (set one of the labels to visible = true). the code is as follows:
Private Sub Form_Load()
Dim varTime As Variant
varTime = Time()
If varTime > "00:00:01" And varTime < "12:00" Then Me.lblGreeting1.Visible = True
If varTime >= "12:00" And varTime < "18:00" Then Me.lblGreeting2.Visible = True
If varTime >= "18:00" And varTime < "23:59" Then Me.lblGreeting3.Visible = True
End Sub
Surprisbglt\y nothin is happening (nothing appearing with the form) and no erors to.
Any ideas what could be missing
Private Sub Form_Load()
Dim varTime As Variant
varTime = Time()
If varTime > "00:00:01" And varTime < "12:00" Then Me.lblGreeting1.Visible = True
If varTime >= "12:00" And varTime < "18:00" Then Me.lblGreeting2.Visible = True
If varTime >= "18:00" And varTime < "23:59" Then Me.lblGreeting3.Visible = True
End Sub
Surprisbglt\y nothin is happening (nothing appearing with the form) and no erors to.
Any ideas what could be missing