Display a message of greeting

Posted on Monday, January 14, 2008 - 16:24 | by admin |

Through a small code we can welcome the user depending on the time you open the form. In this example we can see three different messages:
1-Morning Until 12:00;
2-Up at 19:00 Good afternoon;
3-Between 19:00 and 00:00 Good evening.

Just need a small code, which is as follows:

Public Function Greeting ()
Dim strMsg As String

If Time <# 12:00:00 PM # Then
strMsg = "Hello! Have a nice day! "
ElseIf Time <= # 7:00:00 PM # Then
strMsg = "Hello! Good afternoon! "
Else
strMsg = "Hello! Have a good night! "

End If
Compliance = strMsg
End Function

Then to call the code, we use a text box and as the origin of the compliance monitoring write = ().

Download: Compliance

RSS feed | Trackback URI

2 Comments »

Comment by lalala
2010-10-22 18:50:01

good! + option I wanted!
maybe in the next vcs can help me!
ass: lala

Comment by Administrator
2010-10-23 14:58:44

Just adapt and put more options ...
What options is he wanted to see in this example?

Name (required)
Email (required - not published)
Website
Your comment ( Decrease | Increase )
You can use <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <b> <cite> <code> <del datetime=""> <em> <i> <Q cite=""> <strike> <strong> in the comments.

Presentation

Avatar

Thank you for visiting.
Subscribe to feed not to miss any messages.

Here in blog I will provide examples of working with Microsoft Access and also ask questions to those who ask. More

Want to subscribe?

Subscribe or subscribe by email:
Enter your email:


Ads