Hello
I am using Access 2007. I have two combo boxes called state and county. When I select a state it will populate county combo box with counties that are associated with the state selected. I also created a command button on my form called “Clear Entry”. I used the code County .RowSource = "". It cleared the lists of counties in the county combo box. When I selected a new state from the state combo box for example called California, the county dropdown list would not repopulate. The header for the county dropdown list also disappeared. The requery code in State_AfterUpdate does not work. The only way for the county list to be able to repopulate, was to close the form and open it again. What code would I need to be able repopulate the County combo box. Your help will be greatly appreciated. Thanks. GMSRE
Private Sub cmdClearEntry_Click()
Me.State = Null
Me.County.RowSource = ""
End Sub
Private Sub State_AfterUpdate()
Me.County = Null
Me.County.Requery
Me.County = Me.County.ItemData(0)
End Sub
I am using Access 2007. I have two combo boxes called state and county. When I select a state it will populate county combo box with counties that are associated with the state selected. I also created a command button on my form called “Clear Entry”. I used the code County .RowSource = "". It cleared the lists of counties in the county combo box. When I selected a new state from the state combo box for example called California, the county dropdown list would not repopulate. The header for the county dropdown list also disappeared. The requery code in State_AfterUpdate does not work. The only way for the county list to be able to repopulate, was to close the form and open it again. What code would I need to be able repopulate the County combo box. Your help will be greatly appreciated. Thanks. GMSRE
Private Sub cmdClearEntry_Click()
Me.State = Null
Me.County.RowSource = ""
End Sub
Private Sub State_AfterUpdate()
Me.County = Null
Me.County.Requery
Me.County = Me.County.ItemData(0)
End Sub