A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display random msgbox at logon



 
 
Thread Tools Display Modes
  #1  
Old May 16th, 2006, 06:10 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Display random msgbox at logon

Is there a way to have Access display any one of about 20 different messages
when a user logs on to the database. I would like to remind users of general
departmental tasks, database features, etc. similar to the "tips" that some
software offers to display. Can it be done?
  #2  
Old May 16th, 2006, 06:38 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Display random msgbox at logon

You probably don't want it to be random. I would guess you want it to cycle
through all messages before it repeats. This should also be unique to each
user, rather than global.

I would suggest using the registry to store the last displayed message,
retrieve the value when the db starts up, and then have your code choose the
next message in the table.

Something like this:

'Air code...
Private Sub Form_Open(Cancel As Integer)
Dim intLastMessage As Integer
Dim strMessage As String
intLastMessage=CInt(GetSetting("MyAppName","StartU p","LastMsgId","0"))
intMessage=intMessage+1
SaveSetting "MyAppName","Startup","LastMsgId", intMessage
If intMessage DMax("MsgId","tblMessages") Then
intMessage=DMin("MsgId","tblMessages")
End If
strMessage=DLookup("MessageText","tblMessages","Ms gId = " & intMessage)
Msgbox strMessage, VbOkOnly, "Tip of the Day"
End Sub

HTH,
Barry

"John Barnes" wrote:

Is there a way to have Access display any one of about 20 different messages
when a user logs on to the database. I would like to remind users of general
departmental tasks, database features, etc. similar to the "tips" that some
software offers to display. Can it be done?

  #3  
Old May 16th, 2006, 09:43 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Display random msgbox at logon

Use a two field table - number & message. On start use table message from
query sorted on number field, TOP 1, and then update with random number.

"John Barnes" wrote:

Is there a way to have Access display any one of about 20 different messages
when a user logs on to the database. I would like to remind users of general
departmental tasks, database features, etc. similar to the "tips" that some
software offers to display. Can it be done?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB evaluate a value in a table's column and display msgbox AusTexRich General Discussion 8 October 10th, 2005 10:23 PM
Challenging? Jay General Discussion 6 September 12th, 2005 02:05 AM
Random Sampling of Information to Display in Access 2K2 Reports saschamps9903 Setting Up & Running Reports 1 January 21st, 2005 03:31 AM
? How to display result set in random order? Greg Brady General Discussion 1 August 18th, 2004 04:13 PM
Random Function in VB Jim Campbell New Users 10 August 8th, 2004 12:33 AM


All times are GMT +1. The time now is 12:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.