Making a control visible only on the current record

  • Thread starter Thread starter Istari
  • Start date Start date
I

Istari

Hi

I have a subform on which I need to hide 2 combo boxes and make them visvble
only on the Current Record.

Can anyone tell me how can I do this

Istari
 
Apologies if I've got this wrong, but here goes...

As far as I understand, you want the combo boxes to appear
if you are selecting records in the Sub Form. If the Sub
Form is a datasheet, then control view by the "Got Focus"
and "Lost Focus" Properties on the Sub Form: -

For Got Focus Property: -
Me.ComboBox1.Visible= True
Me.ComboBox2.Visible= True

For Lost Focus Property: -
Me.ComboBox1.Visible= False
Me.ComboBox2.Visible= False

HTH


Tony C
 
Hi Tony

I should clarify....

I have a subform in form view which is viewed as continuous. Datasheet view
won't work in this instance due to the nature of teh for. I would like it so
that two combo boxes in the subform are invisble on all the records except
for the record currently being edited by the user.

Istari
 
Istari said:
Hi Tony

I should clarify....

I have a subform in form view which is viewed as continuous. Datasheet view
won't work in this instance due to the nature of teh for. I would like it so
that two combo boxes in the subform are invisble on all the records except
for the record currently being edited by the user.

There is only *one* instance of these ComboBoxes on your form. What you
see on a continuous form is one set of controls copied on the screen for
each row. If you hide one control, you hide it on all rows. Only data
varies from one row to the next in a continuous form (or expressions based
on the data).
 
Back
Top