1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Microsoft Access Tabbed forms

Discussion in 'Business Applications' started by rocknroller404, Sep 4, 2018.

Thread Status:
Not open for further replies.
  1. rocknroller404

    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!
     
  2. OBP

    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".
     
  3. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Blank database
     

    Attached Files:

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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1216018

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice