Results 1 to 6 of 6
  1. #1
    zplatt98 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Posts
    10

    Hide Field in Subform with Button


    I am trying to hide a field in a Subform after a user clicks a command button. Is this possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Yes. Is the subform in Datasheet, Single, or Continuous view? What are the form and field names? What did you already try?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    zplatt98 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Posts
    10
    Hi June7, Currently I am in form view. Also, the form is called allResin, the subform is named tblResinSubform and the field I am trying to hide in the subform is called DryTotal . I have tried Me.tblResinSubform.DryTotal.Visible = False and Me.DryTotal.Visible = False and neither produce the results I am looking for.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The subform is in Single view?

    I always name subform container different from the object it holds, like: ctrDetails. Then I name controls different from the fields they are bound to, like: tbxDryTot Then code:

    Me.ctrDetails.Form.tbxDryTot.Visible = False

    Why would you want user to control this? Why bother if they can set visibility at will?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    zplatt98 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Posts
    10
    I am not sure how to check and see what view the subform is in. I am just trying to filter the subform for relevant data.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Look at form DefaultView property.

    Hiding a field/control does not filter records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Hide a command button
    By WendellS in forum Macros
    Replies: 5
    Last Post: 03-06-2019, 02:35 AM
  2. Replies: 3
    Last Post: 08-16-2018, 09:52 AM
  3. Replies: 3
    Last Post: 11-18-2012, 12:49 PM
  4. Replies: 1
    Last Post: 02-20-2012, 01:59 PM
  5. Replies: 3
    Last Post: 12-06-2010, 06:35 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
  •  
Other Forums: Microsoft Office Forums