Combo Boxes...

  • Thread starter Thread starter Paul Murphy via AccessMonster.com
  • Start date Start date
P

Paul Murphy via AccessMonster.com

Hello!

Quick question for the group....
I have a form with two combo boxes. The second combo box is populated
through a query which is run against a table and uses a value chosen in the
first combo box as its parameter. My problem is that once the query has
run once, the values stick in the second box. If the user goes back to the
first box and changes their choice of value, the second box will not re-
populate?

Any tips greatly appreciated....

Thanks,
Paul
 
Hello!

Quick question for the group....
I have a form with two combo boxes. The second combo box is populated
through a query which is run against a table and uses a value chosen in the
first combo box as its parameter. My problem is that once the query has
run once, the values stick in the second box. If the user goes back to the
first box and changes their choice of value, the second box will not re-
populate?

Any tips greatly appreciated....

Thanks,
Paul


Private Sub Combo1_AfterUpdate()
me.Combo2.Requery
End Sub
 
OR
Sub Combo1_AfterUpdate ()

Docmd.Runcommand AcCmdRefresh

End Sub

Tip : although it is repopulated, the value in your second combobox will
still be selected. It's a good idea to put this to null, so :

Sub Combo1_AfterUpdate ()

Docmd.Runcommand AcCmdRefresh
Me.Combo2 = Null

End Sub
 
Back
Top