Solved

MS Access Global Variables, Timeouts, and Security

Posted on 2014-10-08
5
315 Views
Last Modified: 2014-10-14
I have an application that I am building that has a low level requirement for security. I am planning on having a user table that stores login IDs, passwords, and security information about what objects they can access and what they cannot.

Upon successfully logging in, I was going to store their USERID in a global variable to be available throughout the application.

If I do this, can the application timeout such that the Global Variable loses it's value?
If so, what is the timeout period?
Any finally, is there a better way to store this info as they navigate and use the application?

Thanks!
0
Comment
Question by:GenesisTech
5 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40369604
Regarding the Global Variables portion of this question eyeballeth thy article on Table Based Access Variables, which will demonstrate a wompload of options on how to pull this off.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 40369605
Yes ... there is a better way that Global Variables ... just for starters >> TempVars

Short tutorial on TempVars by Access MVP Juan Soto

http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx

And TempVars can be called from a query ... which is pretty cool ... and they do not get reset if an error occurs, etc.

The application is not going to 'time out' all by itself. That would be under your control as a developer.

mx
0
 
LVL 57
ID: 40370335
You other option is to open a hidden form at start up and store items in unbound controls.

Jim.
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40370747
In most cases I use the hidden form technique suggested by Jim D because when I am testing, I can leave the form visible and watch all the variables or even change them manually.  I have also used the table based technique suggested by Jim H.  The table based method is excellent for when you need to retain values between sessions.  I do it a little differently though.  I keep the table in the BE rather than the FE.  That means that all users share the same physical table and so I need to include their ID along with the variableID.  When you keep the table in the FE, it is specific to a single user so you don't need to worry about the userID but you do loose the settings when the FE is replaced and users don't like that.
0
 

Author Closing Comment

by:GenesisTech
ID: 40381031
Awesome. I was not aware of TempVars. Excellent Solution - Thanks!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can you open the FORM2 2 31
Using Multiple  Filters (XLS and XLSX) in File selection dialog 6 31
MS Access from Delphi 31 28
Switch 5 16
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question