F
Fjordur
Hi,
I have a form with 3 unbound combos that lets the user filter data. The
combos RowSourceType = Value List, with 3 values, empty string with label
"don't care", -1 with label "yes", 0 with label "no".
The update event of the combo calls the following code:
Public Sub requeryThisForm()
s = CurrentDb.QueryDefs("MyBasicSelectQuery").SQL
If Not IsNull([ComboName]) Then
' modify s according to the value of the combos...
Me.RecordSource = s & ";"
End Sub
This works fine for filtering the data BUT the combos don't display the
chosen value properly. Sometimes they stay empty when I choose yes no; they
always stay mpty when i choose "don't care". I guess it has something to do
with the requery that's triggered when I modify the RecordSource .
How do I get the combos to display the chosen option? Thanks.
I have a form with 3 unbound combos that lets the user filter data. The
combos RowSourceType = Value List, with 3 values, empty string with label
"don't care", -1 with label "yes", 0 with label "no".
The update event of the combo calls the following code:
Public Sub requeryThisForm()
s = CurrentDb.QueryDefs("MyBasicSelectQuery").SQL
If Not IsNull([ComboName]) Then
' modify s according to the value of the combos...
Me.RecordSource = s & ";"
End Sub
This works fine for filtering the data BUT the combos don't display the
chosen value properly. Sometimes they stay empty when I choose yes no; they
always stay mpty when i choose "don't care". I guess it has something to do
with the requery that's triggered when I modify the RecordSource .
How do I get the combos to display the chosen option? Thanks.