BilliD
BilliD

Reputation: 617

Refresh Combo Box query after another

I have two combo boxes on a form. One for start date and one for end date. When a start date is selected it limits the end dates to those greater than the selected start date. This works correctly but how do i get the end date query to refresh when a new start date is selected? Thanks in advance.

Upvotes: 2

Views: 1782

Answers (2)

StuckAtWork
StuckAtWork

Reputation: 1633

Pocket is correct, though it may be beneficial to add

Me.EndDateBox = Null
Me.EndDateBox.Requery

assuming that your query in some way restricts the dates allowed. Adding the "Null" ensures that any entry that WAS in there is no longer; the requery has the possibility of having the correct query with an old (incorrect) input. This forces the user to enter a new, implicitly correct value in the combo box.

Upvotes: 2

Neil_M
Neil_M

Reputation: 482

I think you could use endDateBox.Requery after you limit the values.

Upvotes: 1

Related Questions