Tabbed Subforms

R

Ron

I have a form that also has a Tab subform on it. There
are 4 tabs on this subform. What I would like to do is
put a security level on the 4th and last tab so that only
certain users can view the information that is on this
tabbed subform screen. Does anyone know how this can be
accomplished?
 
J

Jim Allensworth

I have a form that also has a Tab subform on it. There
are 4 tabs on this subform. What I would like to do is
put a security level on the 4th and last tab so that only
certain users can view the information that is on this
tabbed subform screen. Does anyone know how this can be
accomplished?
Of course you mean a Tab control *on* a subform. ;-)

Assuming you have workgroup security enabled then use the Tab's change
event to validate the CurrentUser

Along the lines of...
=================
Private Sub tabOrders_Change()
Dim ctlTab As Control
Dim pge As Page

Set ctlTab = Me.tabOrders
Set pge = ctlTab.Pages(ctlTab.Value)
If pge.Name = "pgRestricted" Then
If CurrentUser <> [the ok user account] Then
'Then send them back to the first page of the tab control.
Me.tabOrders.Pages(0).SetFocus
End If
End If

'.....And so on

- Jim
 

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