473,395 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Not sure how to modify the "Detect Idle User Time" code

OK, so I came across this bit of code from the Microsoft website (https://support.microsoft.com/en-us/kb/128814, with a more recent update at http://www.blueclaw-db.com/user_inactivity_logoff.htm).

I understand how to modify it to adjust the timing involved (i.e. how often to check, how long will be 'too long' for the user to be idle, etc.). However...rather than have the code close out the application, I need it to modify a table, reset itself, & keep going.

The idea is to track how many people will be using a math tutoring lab, & their purpose for the lab (out of 6 possible options). The reports need to be able to show both summary & detail data of how many people are using the lab in a given hour (20, 30, 50, etc.), how many users are coming to the lab for each of the 6 reasons (3 for reason #1, 6 for reason #2, etc.), & the average time the user is in the lab. Since at least 2 of the reasons for coming to this lab will involve college placement testing, they can't just "log in" with their usual student login & password, nor be tracked by the classes they're registered in; because of the nature of the placement testing, the majority of them won't be signed into any classes yet, let alone be assigned logins/emails for the college's servers. But I still need to distinguish them, not only from each other but also from themselves -- for example, if someone comes into the lab for an hour, leaves & comes back for another 20 minutes, leaves again & comes back a 3rd time for 40 minutes, it's going to count on the report as 3 separate visits to the lab.

Now, I'm working on designing the form to allow them to check in & out of the lab. But...these are typical college students, not typical computer science students, so I can't assume that they'll always remember to check out when they're done in the lab. Nor can I allow the system to assume that anyone still logged in when the lab closes was actually there.

I was thinking that, since the data will be tracked in a table, I could remove the part of the code that gets the "active" form & control. But would I be able to have it check the table fields instead...or would I be better off designing a module that a) checks all rows for the day to see if any rows are missing a departure time, & b) if the departure time is missing & the difference between the current time & the row's "arrival time" is greater than an hour, automatically give it a departure time that defaults to an hour spent in the lab?
Dec 7 '16 #1
0 968

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Giuseppe Chielli | last post by:
Hi to everyone! I'm new in this NG. I'm posting this message just for learning how can I modify the type of a field in a table via VBA code. Is that possible? And is anyone so kind to post me some...
1
by: Michael | last post by:
Hi, I'm wondering if somebody knows how to change the application config file from code. I just need to change a value in the appSettings section from "true" to "false", but it doesn't seem like...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
1
by: reinierjose | last post by:
how to logoff user if his session expired? if a users is idle for 15 minutes, the user will be force to logoff from the system. the system must check for keylogs and mouse activity so that the user...
2
by: emmettnicholas | last post by:
Hi, I realize that eval() is generally discouraged, but I've found myself wishing that I could execute user-generated code. One idea I've seen is to use token_get_all(), and then make sure no...
2
by: John Devlon | last post by:
Hi, Does anyone know how to create a new user by code? Using the default control works great but I need a solution using code... something in vb.net not c# Thanx John
5
by: Brett Barry: Go Get Geek! | last post by:
Hello, Can someone please paste VBA code and how I would go about doing this?: I have a customer table with over 6000 duplicates in the field called "Customer". While the customer names may...
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
1
by: brat33 | last post by:
I have a form which will display general data about a branch. Once you select contacts - then the form will display specific into about that branch. I am trying to add a phone number display to the...
4
by: roryclancy | last post by:
how do you configure python-idle to color code the code I've tried going into options and clicked on the highlighter tab and massed around there but i cannot to work
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.