C
Carl Colijn
Hi group,
I found a peculiar situation with my database. When I first use CurrentDB
and then show Workspaces(0).UserName in a MsgBox, I get the name of the
logged in user. However, when I do not first access CurrentDB and ask for
the value of Workspaces(0).UserName right away, I get "admin"... Further
investigation reveals that "admin" really is the logged in user from then
on, at least as far as Access is concerned. When I insert the following
code:
Dim oThisDB As DAO.Database
Set oThisDB = CurrentDb
right before the part where I start using Workspaces(0), all is fine and the
correct current user is recognized again...
Sometimes in my code I first use Workspaces(0) to get some things done
before using CurrentDB. And since "admin" has no rights on my database, all
my error routines get triggered. I know I can work around this issue by
first asking for CurrentDB, but I wondered what might be going on... Is
this by design or is there something else going on? I use Access 2003,
Dutch edition, and the current user logs in via a shortcut that specifies
the workgroup, username and password.
Thanks in advance,
Carl Colijn
I found a peculiar situation with my database. When I first use CurrentDB
and then show Workspaces(0).UserName in a MsgBox, I get the name of the
logged in user. However, when I do not first access CurrentDB and ask for
the value of Workspaces(0).UserName right away, I get "admin"... Further
investigation reveals that "admin" really is the logged in user from then
on, at least as far as Access is concerned. When I insert the following
code:
Dim oThisDB As DAO.Database
Set oThisDB = CurrentDb
right before the part where I start using Workspaces(0), all is fine and the
correct current user is recognized again...
Sometimes in my code I first use Workspaces(0) to get some things done
before using CurrentDB. And since "admin" has no rights on my database, all
my error routines get triggered. I know I can work around this issue by
first asking for CurrentDB, but I wondered what might be going on... Is
this by design or is there something else going on? I use Access 2003,
Dutch edition, and the current user logs in via a shortcut that specifies
the workgroup, username and password.
Thanks in advance,
Carl Colijn