Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.CurrentUser Method (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

You can use the CurrentUser method to return the name of the current user of the database. .

Syntax

expression. CurrentUser

expression A variable that represents an Application object.

Return Value

String

Remarks

For example, use the CurrentUser method in a procedure that keeps track of the users who modify the database.

The CurrentUser method returns a string that contains the name of the current user account.

If you haven't established a security-enabled workgroup, the CurrentUser method returns the name of the default user account, Admin. The Admin user account gives the user full permissions to all database objects.

If you have enabled workgroup security, then the CurrentUser method returns the name of the current user account. For user accounts other than Admin, you can specify permissions that restrict the users' access to database objects.

Example

The following example obtains the name of the current user and displays it in a dialog box.

MsgBox "The current user is: " &; CurrentUser

See also

Concepts

Application Object

© 2017 Microsoft