>I had set up a user level security with a couple of admins and a few users.
>I
[quoted text clipped - 8 lines]
>
> Thanks for any suggestions.
Thank you for the link. I did realize that I should not be setting up a
system.mdw because when I did that even other Access applications had to be
opened with the user name and passwords in the mdw file.
I have put this database on the server and I had split it after that. Now
does it matter where I run the User Level Security wizard from (the server or
my own system?). Moreover, the purpose of having this user sign in is just
for merely tracking the user inputs in case of a question regarding the data
entered. So it does not have to be a very tight security.
I was not too clear about the "they would join it on a
> session-by-session basis using the "/wrkgrp" switch in a shortcut command
> line. ". Please could you further help me out with that?
Also, this is Access 2000.
Thanks once again.
> >I had set up a user level security with a couple of admins and a few users.
> >I
[quoted text clipped - 25 lines]
> Keith.
> www.keithwilby.com
Conrad - 28 Nov 2005 14:35 GMT
If you are strictly looking for the user entering data and not security, an
easier method might be this -
(put this code in a module)
***
Private S1 As String
Private Declare Function WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA"
(ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As
Long
Public Function FindUserName() As String
' Function that returns the name of the currently logged on user
' Example - MyString = FindUserName
S1 = Space(512)
GetUserName S1, Len(S1)
FindUserName = Trim$(S1)
FindUserName = Left(FindUserName, Len(FindUserName) - 1)
End Function
****
I received this code from a newsgroup years ago. Don't know who posted it.
They never signed it. Hope this helps you out.
> Thank you for the link. I did realize that I should not be setting up a
> system.mdw because when I did that even other Access applications had to be
[quoted text clipped - 43 lines]
> > Keith.
> > www.keithwilby.com
MS learner - 29 Nov 2005 14:49 GMT
Will this be pulling the user name from the network login? Could you tell me
how this would be working? Thank you very much for your patience and help.
> If you are strictly looking for the user entering data and not security, an
> easier method might be this -
[quoted text clipped - 68 lines]
> > > Keith.
> > > www.keithwilby.com
Conrad - 29 Nov 2005 14:57 GMT
Yes this will pull the network login. Now that you mention it I was assuming
that the users would be logging into a network and that it was not a shared
pc. If my assumptions were incorrect then the code won't work in this
situation and my appoligies. But if my assumptions were correct then the
code below would work well. Also you won't have to support a security file
and it will be ready to go for anyone logged in.
Hope this helps.
> Will this be pulling the user name from the network login? Could you tell me
> how this would be working? Thank you very much for your patience and help.
[quoted text clipped - 71 lines]
> > > > Keith.
> > > > www.keithwilby.com
MS learner - 29 Nov 2005 19:08 GMT
Thank you very much for the code. I tried the code but an error appears
stating that the method GetUserName S1, Len(S1) has not been defined.
I really appreciate all your help and yes we do have a network login and I
think that would be perfect instead of having an access security.
> Yes this will pull the network login. Now that you mention it I was assuming
> that the users would be logging into a network and that it was not a shared
[quoted text clipped - 80 lines]
> > > > > Keith.
> > > > > www.keithwilby.com
MS learner - 29 Nov 2005 19:32 GMT
It works well now. Thank you very much. I am really relieved to get this
small but important issue out of the way. Once again, thanks.
> Yes this will pull the network login. Now that you mention it I was assuming
> that the users would be logging into a network and that it was not a shared
[quoted text clipped - 80 lines]
> > > > > Keith.
> > > > > www.keithwilby.com
Conrad - 30 Nov 2005 13:18 GMT
Glad that it works.
> It works well now. Thank you very much. I am really relieved to get this
> small but important issue out of the way. Once again, thanks.
[quoted text clipped - 83 lines]
> > > > > > Keith.
> > > > > > www.keithwilby.com