Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Vlad:



    Ok, attached is a more complete mock example of my database. Naturally, do keep in mind that the included objects (and data) are only a "tip of the iceberg". However, I wanted to include the "login" form and "main menu" in the event they've been interfering with the "IDLE Shutdown" process.

    Upon downloading the zipped file, follow the steps as described below:
    - Open Frontend via CTRL+Shift and re-link the tables from the backend
    - Close DB and open normally (w/o CTRL+Shift); user the following credentials for login purposes: Username = "Doe, John"; Password = "admin"
    - Next, in the [Admin] listbox, use the "Unhide Ribbon..." (or "Hide Ribbon...") to display/hide the table/query objects.


    Changes Made to Vlad's Original Example:
    - Changed name of table "tblSettings" to "T904_Admin_Settings"; placed the table into BE and then linked it to FE
    - Changed name of table "tmpCurrentSessions" to "tblLocalCurrentSessions" but kept table in FE
    - Changed name of all four (4) queries starting with "Q105_N1S_Step1 ..." through "Q105_N1S_Step4 ..."
    - Performed a FIND/REPLACE on table & queries name throughout the project to ensure all previous name references are updated throughout the DB (I'm 99% confident I located all references).
    - Form "F103_N1S_DatabaseUsage": Added the DLookup control on form; added subs Form_Timer() and IdleTimeDetected(ExpiredMinutes) to VBA
    - Module "M06_DB_Startup": Replaced the module in the sample DB with module from your zipped file; removed some of the commented lines (bottom of VBA).
    - Lastly, replaced data/content in table "T902_Admin_SystemUserTracking" with different data set. Please see attached JPG for details WRT to ID 2 where DbExit had "03/05/2020 07:52 AM" but does NOT get replaced with a value again. **

    Note: In this example (i.e, ID 2), DbEntry was 07:51" and DbExit was (prior to manual deletion) "07:52". Now, record #3 has DbEntry = "07:52". That would mean that ID 2 would receive 07:52 - 2 min = 07:50. Obviously, that doesn't make any sense given the DbEntry = 07:51.
    Again, please keep in mind that I arbitrarily deleted the 07:52 in ID 2. Not sure if that's the issue as to why it doesn't get re-populated (i.e, DbExit is before DbEntry... logically, that's impossible). Ultimately, I'd be okay to change to "-1" or even "-0" if that were to make a difference.

    In summary, here are the missing pieces that I couldn't get to work:
    1. The DB did NOT shut down after 1 min of inactivity (i.e., I logged into DB and did not select any action from the main menu).
    2. I deleted ID's 2 DbExit but the process never replaced the value again.


    Any final assistance in this matter would be greatly appreciated!

    Cheers,
    Tom
    Attached Thumbnails Attached Thumbnails Table View.JPG  
    Attached Files Attached Files

  2. #32
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Here you are Tom, please try this and see how it goes. For the timer you forgot to set the timer interval in the startup form. And the VBA code for the updates was raising an error due to the way the user name was stored in the be, the function returning the user name is padding a whole bunch of vbnullstring characters (Chr(0)) which where messing up the dlookup, I had to get rid of them with a replace function. In any case, all my testing shows that it is working as it should now, please let me know if this is true for you.

    Click image for larger version. 

Name:	Tom4.jpg 
Views:	10 
Size:	178.7 KB 
ID:	41311
    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #33
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Vlad - wow... it's working great now!!! You're a genius!

    As part of the integration into my actual, I plan to perform the following:
    1. No changes to BE
    2. Replace all four (4) queries (Q105_N1S_Step1... through Q105_N1S_Step4)
    3. Replace "M06_DB_Startup"
    4. Replace "F103_N1S_DatabaseUsage"

    Is there anything else I need to be aware of IOT make it work in actual database? That is, you mentioned "... updates was raising an error due to the way the user name was stored in the be, the function returning the user name is padding a whole bunch of vbnullstring characters (Chr(0))...". So, is there something in my other forms that require a change? For example, I cannot merely copy, e.g., form "F002_SYS_MainMenu" into my DB since my forms has many more functions that I can't lose.

    So, again, besides those 4 items listed above, what else -- if any -- must be modified in my actual FE?

    Cheers,
    Tom

  4. #34
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Tom,

    Glad to hear, not in front of my computer right now but I think if you do the four steps you mention you should be OK, but please do let me know if you still have problems (I'm skiing tomorrow so I might be a bit late getting back to you).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Stamp date, time and user?
    By ricanos in forum Modules
    Replies: 1
    Last Post: 04-06-2016, 08:41 AM
  2. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  3. Replies: 3
    Last Post: 02-16-2015, 01:04 PM
  4. Replies: 2
    Last Post: 11-25-2014, 09:21 AM
  5. Replies: 2
    Last Post: 06-25-2014, 11:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums