Microsoft Access Tabbed forms

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

rocknroller404

Thread Starter
Joined
Aug 1, 2018
Messages
9
Hi there, when I use the following code to show/hide tabs before and after update it works - but only when it's the main form.

Private Sub Job_BeforeUpdate(Cancel As Integer)

If Me.Job = "2" Then
Me.Parent.Page21.Visible = True

Else
Me.Parent.Page21.Visible = False
End If

Private Sub Job_AfterUpdate()

If Me.Job = "2" Then
Me.Parent.Page21.Visible = True

Else
Me.Parent.Page21.Visible = False
End If

I want this to work on the sub-form of the main form instead of the main form. So essentially I would need the parent.parent hierarchy, instead of parent. How can I implement this? Thank you!
 

OBP

Joined
Mar 8, 2005
Messages
19,895
You will probably have to revert to using the main Form's name instead of just "parent".
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top