1
votes

I am working on an MS Access Form. I am trying to have a Combo Box on the form who's list is narrowed based on information earlier in the form. I have a Query saved in the database that gets the list properly.

The problem I am having is that the query is not called after each update of the form so the Combo Box's list is always what it was when the form was opened.

I have tried to force an update using Me.MyComboBox.Requery in the AfterUpdate event of the previous control but this only requeries the record source of theform, not the row source of the Combo Box.

I have also tried changing the row source property to force a requery but that did not work eithier:

    Private Sub PreviusControl_AfterUpdate()
        Me.MyComboBox.RowSourceType = "Table/Query"
        Me.MyComboBox.RowSource = "qryDynamicComboSource"
    End Sub

Thanks in advance!

1
Using Me.MyComboBox.Requery should requery the record source of the combobox. I've knocked up an example and it works for me. My query is SELECT Table1.ID FROM Table1 WHERE (((Table1.ID)>[Forms]![Form1]![minValueTextBox])); and the after update event of the minValueTextBox simply calls Me.Combo0.Requery - ChipsLetten

1 Answers

0
votes

It looks like everything you're doing is correct. Check your query design if it's actually changing based on your parameters.