I am trying to hide a field in a Subform after a user clicks a command button. Is this possible?
I am trying to hide a field in a Subform after a user clicks a command button. Is this possible?
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.
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.
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.
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.
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.