Solved

MS Access Global Variables, Timeouts, and Security

Posted on 2014-10-08
5
305 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
Comment Utility
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
Comment Utility
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

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
You other option is to open a hidden form at start up and store items in unbound controls.

Jim.
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
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
Comment Utility
Awesome. I was not aware of TempVars. Excellent Solution - Thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now