Hy vba saviors
!
I'm very rusty with this and any help would be much appreciated...
So this is my setup. I have database for my users. And I wish to give them an option to take a break ONLY after certain period of time.
What I did:
I created a button and choose Enabled NO. Not much, I know
!
What I wish this button would do:
Idea is that 60 min after initial log-in (log-in times are stored in table) some VBA code would switch this button's Enabled property to YES. So that user can now click on it and take much needed relaxation time.
So, what I need and where I'm lost?
I need code that looks in table where log-in times are stored (let's call it "tbl_login"), search for LAST log-in time for this specific user (current user can be looked up as Temporary Variable, lets call it "tempUser" ) then compare it with current time (I guess function time would be ok) and if difference is more than 60 min it changes Enabled property of button from NO to YES.
Any guidance, idea or even a solution for this would be MUCH appreciated!
Thank you in advance!

I'm very rusty with this and any help would be much appreciated...
So this is my setup. I have database for my users. And I wish to give them an option to take a break ONLY after certain period of time.
What I did:
I created a button and choose Enabled NO. Not much, I know

What I wish this button would do:
Idea is that 60 min after initial log-in (log-in times are stored in table) some VBA code would switch this button's Enabled property to YES. So that user can now click on it and take much needed relaxation time.
So, what I need and where I'm lost?
I need code that looks in table where log-in times are stored (let's call it "tbl_login"), search for LAST log-in time for this specific user (current user can be looked up as Temporary Variable, lets call it "tempUser" ) then compare it with current time (I guess function time would be ok) and if difference is more than 60 min it changes Enabled property of button from NO to YES.
Any guidance, idea or even a solution for this would be MUCH appreciated!
Thank you in advance!