Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How does CurrentUser work?

Posted on 2016-10-19
10
Medium Priority
?
58 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

636 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