Connecting Tech Pros Worldwide Forums | Help | Site Map

How to retrieve User name and group of a secured db vis VBA?

Norman Fritag
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi there,

I would like to retrieve of a secured database the Username and the group
that he / she belongs to, to apply access rights to some button click
events, which are accessing forms that the User Usergroup doesn't have
access to.

Any idea how I would go on about it??

kind regards

Norman f



Miss M
Guest
 
Posts: n/a
#2: Nov 13 '05

re: How to retrieve User name and group of a secured db vis VBA?


I would also like to be able to do this, though I would be content
just to know the user name. I have a secured database on a laptop
that will be passed around amongst users, but we need to know who made
the last change to a record. All users will have the same Windows (XP)
login, but will login individually to the db (MSAccess 2000).

It's so easy to do this in Filemaker, but it seems as if it must be
rather obscure in Access. I have done quite a bit of hunting around
and can't seem to find anything on point.

thanks much.

Norman Fritag wrote:[color=blue]
> Hi there,
>
> I would like to retrieve of a secured database the Username and the group
> that he / she belongs to, to apply access rights to some button click
> events, which are accessing forms that the User Usergroup doesn't have
> access to.
>
> Any idea how I would go on about it??
>
> kind regards
>
> Norman f
>
>[/color]

Jim Allensworth
Guest
 
Posts: n/a
#3: Nov 13 '05

re: How to retrieve User name and group of a secured db vis VBA?


You can use the CurrentUser function to return the - current user.

I also recommend that you download the Security FAQ white paper. There
is much information in it regarding secured dbs.

http://support.microsoft.com/default...;en-us;q165009

- Jim

On Tue, 10 Aug 2004 16:14:52 -0400, Miss M <mmm5w@virginia.edu> wrote:
[color=blue]
>I would also like to be able to do this, though I would be content
>just to know the user name. I have a secured database on a laptop
>that will be passed around amongst users, but we need to know who made
>the last change to a record. All users will have the same Windows (XP)
>login, but will login individually to the db (MSAccess 2000).
>
>It's so easy to do this in Filemaker, but it seems as if it must be
>rather obscure in Access. I have done quite a bit of hunting around
>and can't seem to find anything on point.
>
>thanks much.
>
>Norman Fritag wrote:[color=green]
>> Hi there,
>>
>> I would like to retrieve of a secured database the Username and the group
>> that he / she belongs to, to apply access rights to some button click
>> events, which are accessing forms that the User Usergroup doesn't have
>> access to.
>>
>> Any idea how I would go on about it??
>>
>> kind regards
>>
>> Norman f
>>
>>[/color]
>[/color]

Miss M
Guest
 
Posts: n/a
#4: Nov 13 '05

re: How to retrieve User name and group of a secured db vis VBA?


I gather CurrentUser is not a built-in function?
I didn't see it in the list. But thanks, I hope I can
figure it out from the white paper.
m

Jim Allensworth wrote:
[color=blue]
> You can use the CurrentUser function to return the - current user.
>
> I also recommend that you download the Security FAQ white paper. There
> is much information in it regarding secured dbs.
>
> http://support.microsoft.com/default...;en-us;q165009
>
> - Jim
>
> On Tue, 10 Aug 2004 16:14:52 -0400, Miss M <mmm5w@virginia.edu> wrote:
>
>[color=green]
>>I would also like to be able to do this, though I would be content
>>just to know the user name. I have a secured database on a laptop
>>that will be passed around amongst users, but we need to know who made
>>the last change to a record. All users will have the same Windows (XP)
>>login, but will login individually to the db (MSAccess 2000).
>>
>>It's so easy to do this in Filemaker, but it seems as if it must be
>>rather obscure in Access. I have done quite a bit of hunting around
>>and can't seem to find anything on point.
>>
>>thanks much.
>>
>>Norman Fritag wrote:
>>[color=darkred]
>>>Hi there,
>>>
>>>I would like to retrieve of a secured database the Username and the group
>>>that he / she belongs to, to apply access rights to some button click
>>>events, which are accessing forms that the User Usergroup doesn't have
>>>access to.
>>>
>>>Any idea how I would go on about it??
>>>
>>>kind regards
>>>
>>>Norman f
>>>
>>>[/color]
>>[/color]
>[/color]

Jim Allensworth
Guest
 
Posts: n/a
#5: Nov 13 '05

re: How to retrieve User name and group of a secured db vis VBA?


It *is* a built-in function!

Try this; open the debug window {Ctrl} {g} and type ...

?CurrentUser


If the app is secured you will get the name of the user. If not then
you will get Admin.

?CurrentUser
Admin

Also, if you will select anywhere on the function name and type F1 you
will get help on the function.

- Jim

On Tue, 10 Aug 2004 21:29:49 -0400, Miss M <mmm5w@virginia.edu> wrote:
[color=blue]
>I gather CurrentUser is not a built-in function?
>I didn't see it in the list. But thanks, I hope I can
>figure it out from the white paper.
>m
>
>Jim Allensworth wrote:
>[color=green]
>> You can use the CurrentUser function to return the - current user.
>>
>> I also recommend that you download the Security FAQ white paper. There
>> is much information in it regarding secured dbs.
>>
>> http://support.microsoft.com/default...;en-us;q165009
>>
>> - Jim
>>
>> On Tue, 10 Aug 2004 16:14:52 -0400, Miss M <mmm5w@virginia.edu> wrote:
>>
>>[color=darkred]
>>>I would also like to be able to do this, though I would be content
>>>just to know the user name. I have a secured database on a laptop
>>>that will be passed around amongst users, but we need to know who made
>>>the last change to a record. All users will have the same Windows (XP)
>>>login, but will login individually to the db (MSAccess 2000).
>>>
>>>It's so easy to do this in Filemaker, but it seems as if it must be
>>>rather obscure in Access. I have done quite a bit of hunting around
>>>and can't seem to find anything on point.
>>>
>>>thanks much.
>>>
>>>Norman Fritag wrote:
>>>
>>>>Hi there,
>>>>
>>>>I would like to retrieve of a secured database the Username and the group
>>>>that he / she belongs to, to apply access rights to some button click
>>>>events, which are accessing forms that the User Usergroup doesn't have
>>>>access to.
>>>>
>>>>Any idea how I would go on about it??
>>>>
>>>>kind regards
>>>>
>>>>Norman f
>>>>
>>>>
>>>[/color]
>>[/color]
>[/color]

Closed Thread