Results 1 to 4 of 4
  1. #1
    BLFOSTER is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2013
    Posts
    68

    Visible/Not Visible based on condition VBA

    I have no idea why this has become so difficult. In 2007 it was a snap to make something appear when text was entered in a text box, and make it invisible when text box was empty.



    Cannot get this to work - any ideas?

    Private Sub Form_Open(Cancel As Integer)


    If Not IsNull(Me!Sub1.Form!Sub2withinsub1.Form![sub2field]) Then
    Me!Sub1.form.Sub1field.Visible = true
    else
    Me!Sub1.form.Sub1field.Visible = false
    end if

    end sub

    Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Wrong event for starters, as data isn't usually available in the open event. Try the current event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BLFOSTER is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2013
    Posts
    68
    Thank you. I figured it out

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-29-2013, 01:29 AM
  2. Replies: 6
    Last Post: 09-27-2011, 04:39 PM
  3. Report Fields Visible Based on Checkbox
    By ghillie30 in forum Access
    Replies: 2
    Last Post: 09-21-2011, 09:04 AM
  4. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  5. Replies: 1
    Last Post: 09-27-2010, 04:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums