Hiding a control based on the value of a cbo box column

  • Thread starter Thread starter Kevin C Niven
  • Start date Start date
K

Kevin C Niven

On a from, I want to hide a subform if [cboMyBox].[column](3) is 0.

How do I write the VB code and where do I put it?

I would think this would be easy, but I have tried many different ways
of writing the code in the OnLoad event and nothing works. Perhaps
I'm in the wrong event.


Many thanks,
Kevin
 
Kevin,

Try code like this in the On Current event of your form and in the After
Update event of your combo box:

If Me.cboMyBox.column(3) = 0 then
     Me.NameOfSubForm.Visible = false
Else
     Me.NameOfSubForm.Visible = true
end if

Great, On Current worked. Thanks very much.


Kevin
 
Back
Top