How to Suppress Viewing Subform Field

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

I have two Datasheet Subforms (frmAutoSubform1, frmAutoSubform2) which
reference the same text field (txtCar) in a query.
Each subform names this field txtCar1 and txtCar2, so that I may populate
these fields with VB.

1. If I specify that these fields are NOT visible, they still show on the
forms. I don't want them to appear on the forms.

2. If I delete these fields from the forms, then I can't refer to them in
VB.

How do I refer to these fields in VB, but not have them appear on the forms?

Thanks,
Bernie
 
I assume that you mean a textbox. Afield is a property of a table, not a
control on a form. Reference to controls on a subform must be made as
follows:

Forms!MyFormName!MySubformControlName.Form!TextboxName.Visible

or

Me!MySubformControlName.Form!TextboxName.Visible
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Thanks for the reply, Arvin!

Your suggestion didn't work for me either. However, I did discover looking
for solutions on the internet how to hide the columns. The method is to
simply select the Subform, then Format>Hide Columns. This is exactly what I
wanted to happen on my datasheet.

Thanks again,
Bernie
 
bw said:
I have two Datasheet Subforms (frmAutoSubform1, frmAutoSubform2) which
reference the same text field (txtCar) in a query.
Each subform names this field txtCar1 and txtCar2, so that I may populate
these fields with VB.

1. If I specify that these fields are NOT visible, they still show on the
forms. I don't want them to appear on the forms.

2. If I delete these fields from the forms, then I can't refer to them in
VB.

How do I refer to these fields in VB, but not have them appear on the forms?


Check Help for the ColumnHidden and ColumnWidth properties.
Maybe you can use them to do what you want.
 
Back
Top