Hide a page tab on form using VBA for current user (1 Viewer)

Tor_Fey

Registered User.
Local time
Today, 02:33
Joined
Feb 8, 2013
Messages
121
Good Day All;

I am looking to hide page tabs on my form for a current user; I have tried the following 'onload' event:

Code:
If Me.loggedon = jblog Then
Me.TabCtl6.Pages(0).Visible = False
End If

Please not: the field: 'loggedon' is an unbound text field which source is set to =currentuser()

The above code doesn't work, the tabs are always showing regardless, if someone could point me in the right direction on this matter; it would greatly be appreciated. :banghead:

Regards
Tor Fey
 
Last edited by a moderator:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:33
Joined
Jul 9, 2003
Messages
16,271
Try:-

Code:
 If currentuser() = jblog Then
Me.TabCtl6.Pages(0).Visible = False
End If

Sent from my SM-G925F using Tapatalk
 

Tor_Fey

Registered User.
Local time
Today, 02:33
Joined
Feb 8, 2013
Messages
121
Hi Uncle Gizmo;

Thanks for the reply, unfortunately I have tried this code and it doesn't seem to work either? Is there any other way of doing this?

Regards
Tor Fey

Try:-

Code:
 If currentuser() = jblog Then
Me.TabCtl6.Pages(0).Visible = False
End If
Sent from my SM-G925F using Tapatalk
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:33
Joined
Jul 9, 2003
Messages
16,271
Instead of "currentuser()" try a known value in the list in "jblog" and see what results you get
 

missinglinq

AWF VIP
Local time
Yesterday, 21:33
Joined
Jun 20, 2003
Messages
6,423
What is jblog? If it's a user name it probably needs to be in Quotes, i.e.

"jblog"

Linq ;0)>
 

Users who are viewing this thread

Top Bottom