Combo box help needed !!!

D

Deltic

I have two combo boxes on my main form, with a list say 1 - 5 what i
am trying to do is keep the second combo box hidden from view unless
the choice made in the first combo box say = 3 . Is this possible and
if so where and what code do i need to use?

Thanks
 
L

Linq Adams via AccessMonster.com

Private Sub FirstComboBox_AfterUpdate()
If Me.FirstComboBox = 3 Then
SecondComboBox.Visible = True
Else
SecondComboBox.Visible = flase
End If
End Sub

Private Sub Form_Current()
If Me.FirstComboBox = 3 Then
SecondComboBox.Visible = True
Else
SecondComboBox.Visible = flase
End If
End Sub
 
T

tina

try adding the following code to first combobox control's AfterUpdate event
procedure, as

Me!OtherCombo.Visible = (Me!FirstCombo = 3)

and you'll probably want to add the same code to the form's Current event
procedure, too, so existing records will be affected as well.

hth
 

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