Tabbed Subforms

  • Thread starter Thread starter Ron
  • Start date Start date
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?
 
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
 
Back
Top