Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Access Global Variables, Timeouts, and Security

Posted on 2014-10-08
5
Medium Priority
?
341 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 2000 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 39

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

704 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