Using the select case VB function

B

bmacrow

Hi there,

I apologise for what may be a failry newbie question, as I am one! I have a
database that has user level security implemented into it. I am now trying to
modify my database start page dependant on the user that has logged in,
specifically his access level so that i can make some options only visible
when an administrator is logged in.

I had the idea of using the select case function as follows:

Select Case __________

Case "Admins"
Me.userman.visible = true

Case else
Me.userman.visible = False

End Select

Problem is I dont know how to relate this to actually look at the users
access level i gthink i need something where i put the ________________

Anyone able to help

Many Thanks

Ben
 
T

Tom Lake

bmacrow said:
Hi there,

I apologise for what may be a failry newbie question, as I am one! I have a
database that has user level security implemented into it. I am now trying to
modify my database start page dependant on the user that has logged in,
specifically his access level so that i can make some options only visible
when an administrator is logged in.

I had the idea of using the select case function as follows:

Select Case __________

Case "Admins"
Me.userman.visible = true

Case else
Me.userman.visible = False

End Select

Problem is I dont know how to relate this to actually look at the users
access level i gthink i need something where i put the ________________

If you only have two choices, you can use this:

If __________ = "Admins" Then
Me.userman.visible = True
Else
Me.userman.visible = False
End If

What goes in the _______ depends on what you've called the field
where you've stored your user level.

Suppose in your user table you have a record for each user and
a field in that record that holds the user's access level

tblUsers
Name As String * 50
Phone As String * 10
AccessLevel As String * 10

then in the _________ you'd use AccessLevel.

Tom Lake
 
B

bmacrow

ahha!, so this is where i am struggling slightly i guess then!

I dont have a table of suers a such that i have created, as this has been
done through the access user level security wizard, now i assume there are
tables created by that in the.mdw file that it uses, but how would i go abotu
referencing that?

Cheeers
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top