Get real time value of a textbox from a front end database of each users (1 Viewer)

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Hi everyone, good day!

Reaching out again for help :). I have a front end file, with multiple users. The front end is an Activity Tracker. This front end file has 3 textboxes, one has the user's id, one has the activity they currently are in and the last one has timer running. I would like to be able to get the real time values for each users and get it to show on textboxes on another form on another access database. My purpose is to have like a dashboard where I can see all user's current activity and running time on that particular activity they are currently in. I am hoping this is possible. Looking forward again for your help guys!
 

June7

AWF VIP
Local time
Today, 00:25
Joined
Mar 9, 2014
Messages
5,474
Does each user run their own copy of front end? Should save data to table then other db can link to table for 'real-time' info.
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Does each user run their own copy of front end? Should save data to table then other db can link to table for 'real-time' info.

Hello, yes they have their own copy of front end, do we have to save all front end in one location?

The data is saved in a back end table, however it will only save once they click on a button, and that will change their activity. What is saved is no longer the real time.
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Hello, yes they have their own copy of front end, do we have to save all front end in one location?

The data is saved in a back end table, however it will only save once they click on a button, and that will change their activity. What is saved is no longer the real time.

I have attached a visual, hope this helps.
 

Attachments

  • Help Needed.docx
    33.4 KB · Views: 47

theDBguy

I’m here to help
Staff member
Local time
Today, 01:25
Joined
Oct 29, 2018
Messages
21,474
I have attached a visual, hope this helps.
Hi. "Real time" would probably mean you'll have to use a Timer event on the form to push the "current" time value to the table, so you can view it from another database. However, using a Timer event could potentially "mess" with whatever the user is doing on their end.
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Hi. "Real time" would probably mean you'll have to use a Timer event on the form to push the "current" time value to the table, so you can view it from another database. However, using a Timer event could potentially "mess" with whatever the user is doing on their end.


Ok, so can we like push the current value every 10 seconds for example? How do I do it for all users of the front end? Do they have to use a specific front end file?


Can the timer event change something on the front end? like the values on the textboxes?
 

June7

AWF VIP
Local time
Today, 00:25
Joined
Mar 9, 2014
Messages
5,474
Save a record when starting activity. When activity is changed, 'close out' open record then create a new record.

The 'current' activity is record where 'closed' field Is Null.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:25
Joined
Oct 29, 2018
Messages
21,474
Ok, so can we like push the current value every 10 seconds for example? How do I do it for all users of the front end? Do they have to use a specific front end file?

Can the timer event change something on the front end? like the values on the textboxes?
Hi. Yes and yes. The timer event will fire at an interval you set. When it fires, you can execute any code you need/want to. I imagine you can use a timer event on the form where you're displaying the information you want to push. When the timer event fires, you can push the current time to the table, so you can read it from your dashboard.
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:25
Joined
Sep 21, 2011
Messages
14,311
Wouldn't your dashboard have to requery every 10 seconds as well to get the latest values.?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:25
Joined
Oct 29, 2018
Messages
21,474
Wouldn't your dashboard have to requery every 10 seconds as well to get the latest values.?
Maybe, maybe not. There is a default refresh rate, but I think it's somewhere around 60 seconds though.
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
There will be multiple users of the front end. How do I get each user's current information?
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Save a record when starting activity. When activity is changed, 'close out' open record then create a new record.

The 'current' activity is record where 'closed' field Is Null.

Hello, I apologize I didn't get it. how do I do this? How do I get each user's record?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:25
Joined
Oct 29, 2018
Messages
21,474
There will be multiple users of the front end. How do I get each user's current information?
If you put the timer event on the FE, then each running copy of the FE would push their own data to the BE that you can then view on your end.
 

June7

AWF VIP
Local time
Today, 00:25
Joined
Mar 9, 2014
Messages
5,474
Hello, I apologize I didn't get it. how do I do this? How do I get each user's record?

You query the log table.

Correction to my earlier post. Each user FE has a link to the log table and is updated by the FE. Whether you have another copy of this same FE or another FE linked to the log table, just query the table.

Might need a timer behind form displaying these log records for periodic requery.
 
Last edited:

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
If you put the timer event on the FE, then each running copy of the FE would push their own data to the BE that you can then view on your end.

I actually already have the back end, and all logs are saved there, however those are not real time anymore as those are activity logs that the users are already done with, the logs are only saved once the users clicked on another activity. I also need to show the "live" running time, like it is literally running timer. Shows like this for each user.
 

Attachments

  • Capture.PNG
    Capture.PNG
    3.9 KB · Views: 45

theDBguy

I’m here to help
Staff member
Local time
Today, 01:25
Joined
Oct 29, 2018
Messages
21,474
I actually already have the back end, and all logs are saved there, however those are not real time anymore as those are activity logs that the users are already done with, the logs are only saved once the users clicked on another activity. I also need to show the "live" running time, like it is literally running timer. Shows like this for each user.
Hi. You can keep the log table, if you want a record of when things got done. For your "running timer," you can create a new table in the BE for it. This table will store the current time for each user, which you can then display on your dashboard. However, I wonder if you're missing the "warning" we have been mentioning. This is a novel idea, but the price for implementing it might prove too costly for your user's productivity, not to mention possible affect to the data each time the timer fires. You see, when the timer fires, it is out of the user's control. So, if they're doing something, it might either disrupt them or it may result in unexpected outcomes.
 

June7

AWF VIP
Local time
Today, 00:25
Joined
Mar 9, 2014
Messages
5,474
Well, my suggestion is a change in process. I suggested creating record in log table when activity starts, not ends.

You retrieve 'open' records and calculate elapsed time in your FE, with a timer to refresh if you want but a timer would not be running for users and therefore not interfere with their productivity.
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Hi. You can keep the log table, if you want a record of when things got done. For your "running timer," you can create a new table in the BE for it. This table will store the current time for each user, which you can then display on your dashboard. However, I wonder if you're missing the "warning" we have been mentioning. This is a novel idea, but the price for implementing it might prove too costly for your user's productivity, not to mention possible affect to the data each time the timer fires. You see, when the timer fires, it is out of the user's control. So, if they're doing something, it might either disrupt them or it may result in unexpected outcomes.

Yes, I took note of the possibility that the timer might mess up what the user might be doing, but they are not really working on the DB, it just serves as tracker, they just all the users do are click on toggles and the logs will be saved, would the timer affect that?


Is there a way I could do the timer on a separate db file not on the BE? How could I do the timer thing? I apologize as I am a beginner and I don't know much on how to do this yet?
 

Mackbear

Registered User.
Local time
Today, 03:25
Joined
Apr 2, 2019
Messages
168
Well, my suggestion is a change in process. I suggested creating record in log table when activity starts, not ends.

You retrieve 'open' records and calculate elapsed time in your FE, with a timer to refresh if you want but a timer would not be running for users and therefore not interfere with their productivity.

I think I'm getting this but, just don't know how to get the 'open' records how do I know that the records are open? and how to calculate the elapsed time?
 

June7

AWF VIP
Local time
Today, 00:25
Joined
Mar 9, 2014
Messages
5,474
As stated in post 7:

Save a record when starting activity. When activity is changed, 'close out' open record then create a new record.

The 'current' activity is record where 'closed' field Is Null.


Calculate elapsed time with DateDiff() function using the logged in start date/time and Now().

Have a form bound to log table. RecordSource filtered to retrieve only records WHERE closed Is Null. Elapsed time calculation in query or textbox.
 
Last edited:

Users who are viewing this thread

Top Bottom