Results 1 to 4 of 4

Visible property in subform columns

  1. #1
    MDB
    MDB is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    7

    Visible property in subform columns

    Hi All,

    I have a form which is made up of a few fields and a subform. When I set the visible property to NO for either of the fields in the subform the columns are still visible.

    However, when I set the visible property to No in te master form the fields are hidden.

    Many thanks.

  2. #2
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,696
    you are probably thinking of "column" as something other than the field. the discrepency, as hence the issue, probably lies there.

  3. #3
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    To set a subform's column (in datasheet view) to hidden:

    From the parent form:
    Code:
    Me.SubformControlNameHere.Form.ControlNameHere.ColumnHidden = True
    Where SubformControlNameHere is the name of the subform control (control on the parent form which houses the subform) and not the name of the subform itself, unless they are exactly the same name.

    From the subform itself the code is:
    Code:
    Me.ControlNameHere.ColumnHidden = True
    See this reference for what you can do with datasheets:
    http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

  4. #4
    MDB
    MDB is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    7
    Hi Bob,

    Thanks for your informative and constructive response. This has worked.

    Quote Originally Posted by boblarson View Post
    To set a subform's column (in datasheet view) to hidden:

    From the parent form:
    Code:
    Me.SubformControlNameHere.Form.ControlNameHere.ColumnHidden = True
    Where SubformControlNameHere is the name of the subform control (control on the parent form which houses the subform) and not the name of the subform itself, unless they are exactly the same name.

    From the subform itself the code is:
    Code:
    Me.ControlNameHere.ColumnHidden = True
    See this reference for what you can do with datasheets:
    http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

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

Similar Threads

  1. Replies: 8
    Last Post: 09-05-2011, 10:16 PM
  2. Making subform field visible/invisible
    By Snufflz in forum Forms
    Replies: 3
    Last Post: 01-17-2011, 03:30 AM
  3. Replies: 2
    Last Post: 01-06-2011, 02:38 AM
  4. Replies: 10
    Last Post: 12-31-2010, 10:35 AM
  5. Tab only visible when field = x
    By ecpike in forum Forms
    Replies: 7
    Last Post: 06-08-2009, 03:38 PM

Posting Permissions

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