Solved

MS Access Global Variables, Timeouts, and Security

Posted on 2014-10-08
5
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 66

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 - Microsoft MVP, Access and Data Platform) 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 58
ID: 40370335
You other option is to open a hidden form at start up and store items in unbound controls.

Jim.
0
 
LVL 38

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

626 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