Solved

How does CurrentUser work?

Posted on 2016-10-19
10
26 Views
Last Modified: 2016-10-20
I'm trying to create a Login form for a Access 2013 program.  I'm finding CurrentUser referenced in the program's vba code (ventage Access 2003).  If I create a Login form/function, do I need to save it as CurrentUser?  If so, how do I do that?

Judith
0
Comment
Question by:JudithARyan
  • 6
  • 4
10 Comments
 
LVL 5

Expert Comment

by:efrimpol
ID: 41850919
0
 

Author Comment

by:JudithARyan
ID: 41852374
The link doesn't cover how the system/access sets or obtains CurrentUser.  I'm trying to write my own security procedure for Access 2013.  Do I need to set CurrentUser after a user logs into my security login form?  If I don't set it, will it continue to use Admin?

Judith
0
 
LVL 5

Expert Comment

by:efrimpol
ID: 41852421
Also reference the following link:

https://bytes.com/topic/access/answers/842129-get-windows-logon-username-into-form-field

There is a module that you will need to create and save (the above link references that and even supplies the code).

Then further on down, there are instructions on how to add it to the form.
0
 
LVL 5

Expert Comment

by:efrimpol
ID: 41852423
Sorry.

This is the link to the code:

http://access.mvps.org/access/api/api0008.htm

That is what you have to copy into the module.
0
 

Author Comment

by:JudithARyan
ID: 41852552
Somehow you've gotten off on the wrong track about what I need.  

The login I'm concerned about is the user logging into my Access application, not a Windows login.  The way our office is setup, we have multiple volunteers using a workstation at different time during a week.  

So, all my questions are directed toward an Access app login.

Sorry for the misunderstanding.

Judith
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 5

Accepted Solution

by:
efrimpol earned 500 total points
ID: 41852612
Unless you have Access Security enabled, anyone who opens the database will be identified as "Admin".

But if you don't and you wish to create a login form, then this may be more geared to what you are looking for:

http://www.iaccessworld.com/create-login-form-ms-access/

I have attached an example db that I downloaded from another site. You can open it in design mode to get a better idea of how it is set up.
loginexample.zip
0
 

Author Comment

by:JudithARyan
ID: 41852675
Thanks! you're my best solution.  

So what is Access Security and how is it enabled?

Judith
0
 
LVL 5

Expert Comment

by:efrimpol
ID: 41852752
In versions prior to Access 2007 (2003 and below), you would use a MDW file and you can set up users and permissions and stuff.

Then they (Microsoft) took it away from 2007 and forward.

The login form is a workaround.

There are also other methods you can use, but this is really the easiest as the others involve writing codes and using Modules and Event Triggers.
0
 

Author Closing Comment

by:JudithARyan
ID: 41852984
Thank you for all your help.  Judith
0
 
LVL 5

Expert Comment

by:efrimpol
ID: 41852985
EE aims to please. Remember to close the post!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

14 Experts available now in Live!

Get 1:1 Help Now