(Continued) Selective display of fields/buttons in a subform

R

RoBo

Who can give me a hand?

In a subform, displayed on a tab control, I would like to hide/show several
fields, based on the value of one of the fields in this subform. If the field
'Description' contains a specific value, some fields on the subform should be
hidden, as well as two buttons. With what event can I control this?

I am using Single Form view.

Thanks for all the help, Ron
 
A

Allen Browne

In Single Form view, you could use the Current event of the form to set the
caption of the command button:

Private Sub Form_Current()
Me.Button1.Caption = Nz(Me![Description], vbNullString)
End Sub
 
R

RoBo

Hello Allen,

Thanks for the info; I'll give it a try after my vacation.

Ron

Allen Browne said:
In Single Form view, you could use the Current event of the form to set the
caption of the command button:

Private Sub Form_Current()
Me.Button1.Caption = Nz(Me![Description], vbNullString)
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

RoBo said:
Who can give me a hand?

In a subform, displayed on a tab control, I would like to hide/show
several
fields, based on the value of one of the fields in this subform. If the
field
'Description' contains a specific value, some fields on the subform should
be
hidden, as well as two buttons. With what event can I control this?

I am using Single Form view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top