View Full Version : Disable subform if your not admin user


bseche
10-24-2001, 05:04 AM
I have a form with a subform. I want the subform to be only available to the admin users. It's kind of like Hidden the subform and then if it's admin make it available.

SteveA
10-24-2001, 05:06 AM
Is your database secured or do you have another way of identifying an Administrator?

Cheers,
SteveA

saintsman
10-24-2001, 05:08 AM
Why not have two forms, one with and one without the subform. Just make the one with the subform available to the administrator.

bseche
10-24-2001, 05:24 AM
Good idea saintsman
In reply to SteveA
I don't have the security setup yet. I have about 50 people that will be accessing the form. 2 out of the 50 are admin users.
I'm planning on setting it up so when they launch the database it asks for user name and password. If the user is admin it will allow them to view the subform.

SteveA
10-24-2001, 05:38 AM
In VBA you can make a field visible or hidden by setting its Visible property to True or False. For a subform, you might have

Me.SubformName.Visible = Administrator()

Administrator() could be a program or a field that identifies if the current operator is an administrator.

HTH,
SteveA