CaptainBob007
Programmer
Hi -
This probably simple, but I can't figure it out for the life of me.
I'm attempting to add some user-level security to a database I'm writing, and I have a table
to hold this information. One of the fields in that table is
, which is the access level of the user. The name of the current user is stored as the public variable
.
Anyhow, I am trying to write a function
to take the user name from
and return
. I can only assume this would require an SQL query, and I know how to word it, but I cant figure out how to get the result of the query (which must be unique as
is the primary key of
.
The query I have come up with is as follows:
There's gotta be something I'm missing here. Any help would be appreciated!
~Bob
This probably simple, but I can't figure it out for the life of me.
I'm attempting to add some user-level security to a database I'm writing, and I have a table
Code:
tblUsers
Code:
UserLevel
Code:
CurrUser
Anyhow, I am trying to write a function
Code:
GetUserLevel()
Code:
CurrUser
Code:
UserLevel
Code:
CurrUser
Code:
tblUsers
The query I have come up with is as follows:
Code:
DoCmd.RunSQL "select UserLevel from tblUsers where UserID = " & CurrUser & ";"
There's gotta be something I'm missing here. Any help would be appreciated!
~Bob