Solved

How does CurrentUser work?

Posted on 2016-10-19
10
48 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
[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
  • 6
  • 4
10 Comments
 
LVL 6

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 6

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

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
 
LVL 6

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 6

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 6

Expert Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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