Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Groups

Status
Not open for further replies.

vilmarie

Programmer
Joined
Feb 10, 2004
Messages
41
Location
PR
I have a table to user with the following fiels:
Username, Fullname, GroupName:

I need to obtain the GroupName of the person who log to the application. For example:
username:vfiguer
Fullname:Vilmarie
GroupName:User

If vfiguer is the Currentuser I need to know the GroupName: It is possible?

I write this code:


Private Sub Form_Current()
Dim strSQL As String

strSQL = "SELECT DISTINCTROW Group FROM UserInfo WHERE Username = CurrentUser()"
Me!txtGroup.Value = strSQL
end sub

But I not obtain the name of the group.
 
Are you using the standard access security scheme ?
If not, you may consider this:
Environ("USERNAME") instead of CurrentUser()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
YES I use the Access Security, But i Need to obtain the Group to this user is member.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top