?
Solved

Send Popup message from MS Access to users

Posted on 2004-04-19
11
Medium Priority
?
1,645 Views
Last Modified: 2012-05-04
Hi everyone!,
I have an MS Access Database as Master Data and there are few access database applications as front end used by few users. (these database tables are linked to main Database master). If I want to edit my main database all other users need to close their applications. So i have to inform them to close applications for a while.  Is there any way to send a popup message to those are online (i know who are online, i can get a list).  I can send message through email, but i need a popup message through MS Access or a Visual Basic application to send a message through LAN to those who are using my applications (all are using one workgroup file).  Appreciate your valuable comments.....
Regards
0
Comment
Question by:manchery
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10866342
Hi manchery,

You could call the "NET SEND {name | * | /DOMAIN[:name] | /USERS} message" command via a Shell (or ShellExecute API) call.

For example,

Shell("NET SEND manchery LOG-OFF!")


BFN,

fp.
0
 
LVL 35

Assisted Solution

by:[ fanpages ]
[ fanpages ] earned 200 total points
ID: 10866348
Hi again,

...or perhaps create a "Message" table in your application that is queried every 10 seconds or so.

If it contains a record, then this is displayed on the Application StatusBar of MS-Access.

BFN,

fp.
0
 

Author Comment

by:manchery
ID: 10866445
Hi fanpages,
Thanks for your early response.  I appreciate if u could explain me more about creating table and query.  If I use this option to query every 10 seconds do u think it will disturb the users while it running every 10 seconds?,, pls explain me the way to do, if its not disturbed..
thanks
manchery
0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 

Author Comment

by:manchery
ID: 10866452
hi fanpages, do you mind to use any chat option like yahoo chat, would like to talk with u faster, if u dont mind u can use my yahoo id vm_2000 at yahoo dot com   change at and dot ok,, regards
0
 

Author Comment

by:manchery
ID: 10866458
sorry just missed a letter in my id,, its vmj_2000 really sorry
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10866485
Hi manchery,

Chatting offline would defeat the object of this forum and give me an unfair advantage at answering your query, so sorry, no I cannot do this.

I was proposing that on a MS-Access form that is always loaded you have a timer control that queries the contents of the "Message" table on a regular basis (10 seconds if you wish, longer to suit your organisation's infrastructure and subject to the specification of your end users' workstations, thus avoiding 'disturbance').

If a record if found (i.e. Use a recordset to query with SQL "SELECT * FROM [Message_Table]" and if the Recordset RecordCount is > 0) then display a message to the Application StatusBar.

You could then place messages in the [Message_Table] (or delete a previous message) from the comfort of your own machine.



BFN,

fp.
0
 

Author Comment

by:manchery
ID: 10866506
Thank you boss,
How about if they are not on a specific form.  I wish as soon as i send a message they have to see it as a popup. Otherwise email is working ok. the problem with email is if they didnt open their email application (Lotus notes) they wont get the message immediately, it delays our time. Please tell me what is the best option to send them popup message immediately no matter on which form they are. really appreciate ur valuable time and expertise,,,
thanx
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10866559
Hi fanpages,

As I said previously, you could use

Shell("NET SEND manchery LOG-OFF!")

Or alternatively you could use:

MsgBox("Message")

Or even create a specific form to load just to display the message.


The form I mentioned above would not be shown and would always be loaded.
It is needed for the Timer control and is not for the user to open/close/edit etc.


BFN,

fp.
0
 
LVL 16

Accepted Solution

by:
ahmedbahgat earned 300 total points
ID: 10866657
you may try this,

backend work:

1. create a table in the backend and call it "WarnUsers" for exampe
2. the table will have only one field, let's call it "Activate"
3. the field data type will be yes/no  ie either 0 for No, -1 for Yes
4. add a record to that table and the data should be No  ie 0

frontend work:

1. Link the frontend to the new table
2. create a function in a global module, that will represent the warninig message ie:

Function Warning()
  Beep
  MsgBox "You must exit the application within a minute for an urgent update", 16, "Warning"
End Function

3. create a form "Warningfrm", a tiny and empty one with no objects in there, this form should be opened hidden when the users start their frontend, ie it will be running all times, but the users do not see it, this can be achieved using the following command:

DoCmd.OpenForm "Warningfrm", , , , , acHidden

4. this form will have some code in the OnTimer event:

Dim Rs As RecordSet
Set Rs = CurrentDB.OpenRecodSet("SELECT WarnUsers.* FROM WarnUsers;")
If Rs!Activate = -1 Then
    Warning
End If
Rs.Close

5. make the Timer Interval = 10000 which is about 3 seconds

to warn all users, you open the backend, open the table we created and change the field data from 0 to -1, this will force the message to popup every 10 seconds "pretty annoying and they have to close access


my final note will be there will be an overhead regarding OnTimer event for the hidden form but I believe it will be minute as the table will always include 1 field and 1 record, that is 0 or -1, the simplest thing a computer can recognise, you can tell us on the effect

cheers
0
 
LVL 16

Expert Comment

by:ahmedbahgat
ID: 10866667
sorry fanpages

it seems what Iposted is your idea in full details, the credit goes to you anyway

cheers
0
 

Author Comment

by:manchery
ID: 10867024
Thank you fanpage & ahmedbahgat for your support and expertise. As fanpage provided the idea and ahmedbahqat explained it. so i had split the points to make both of happy.
Thanking you once again.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question