Link to home
Start Free TrialLog in
Avatar of Kamlesh Jain
Kamlesh JainFlag for India

asked on

Multi user Envirornment - User messaging system

Hello,
i have a multiuser (Databse not splitted yet as backend) database. Need to know if following additions can be done ?

1. Can i know How many users are logged into the system ?
2. Can a centralized messaging form or alert can be created e.g. A Pop Up message from one user to all other users to logout immediately. ?

A line of succession shall be appreciate.
Thanks in advance.
Kamlesh Jain
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Please ... follow best practice ...and split into a front end and back end ... *especially* if you are doing multi-user. Until you do that ... all bets are off. And it's very simple.
1.  There are tools on the internet to determine how many users are currently connected to your back end.
2. Yes ... there are tools for that as well.
(these are the short answers for the moment)
Avatar of Kamlesh Jain

ASKER

Thanks.  

 Could you guide me some methodology for point no 2.. like how to begin with ? Any code if available ...or any pseudo codes ?
 i am confused as hell ...  :)
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks... Scott. Nice explanation. Splitting of data base is in my next step as the programme is under trial and many amendments are required at frequent levels. Meanwhile, i will try the code for message box kinda thing and shall revert.
Thanks again for your kind suggessions.

Regards,
Splitting of data base is in my next step as the programme is under trial and many amendments are required at frequent levels.
I'd suggest this be your immediate next step. Even during development, a split database is the correct way forward.
I tested above code, but my purpose is that i shall be able to trigger a message  whenever there is a need ... (Not a time bound message like above). In that case, i think i shall run the code on a button.. hope it works...Am i right in doing so ?

Secondly, i will split the database immedately ... :)
Thanks
I want to pass on a message (Pretyped or new message) to all the users who are logged into system. How to do that ?
Access wasn't intended to act as a messaging application.  I have no idea if what I am suggesting will actually work but it is what I would try.

1. Create a table to store the messages.  Fields are: MsgID, To, From, TimeSent, MsgText
2. Create a form to display the messages.  The form would be bound to a query that selects messages for only the currently logged in user and sort them descending by TimeSent.
3. The msg form should be small and permanently displayed.  It requires a Timer Event (be careful with these) and the timer event must requery the msg form.  Remember forms are bound to recordsets.  They do not show new records unless you requery the recordset so there will ALWAYS be a delay between when the message is sent and when it is displayed.  You don't want the timer event to be chewing up all the system resources by constantly requerying a recordset so you have to set the interval to at least a minute.  That would be your delay.  Also, you might need a way to alert the user.  Maybe, only display messages sent in the past five minutes .  Then blank the form.  However, this runs the risk of the user never seeing the message.

All in all, there are other alternatives and while I think Access is a fabulous tool. It isn't well suited to this.
That's pretty much what I suggested earlier, Pat.
Or ... don't reinvent the wheel and try the FMS product :-)
Time IS Money, right ?
Sometimes the answer is you can't get there from here.
You asked for a messaging system contained in Access, and all 3 Experts provided you with valid solutions. Whether you want to take the time to implement those suggestions is beside the point.

I know that the system suggested by myself and Pat will work, and the utility suggested by Joe will do so with no real effort.
No reason for this question to be deleted!
Thanks team. I will try with Mr Pat and if not working, then will go with Mr Joe solution.
Thanks again. :)