Greetings:
I have a form that I would like to filter based on a selection in one combo box. I used the "Filter the Form Based on My Selection" wizard.
I have the following code in the combo box:
Private Sub Combo4_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[idnStateID] = " & Str(Nz(Me![Combo4], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I then have the following code in the query behind the combo box:
SELECT tblState.idnStateID, tblState.StateLong FROM tblState UNION SELECT "*", "All" FROM tblState;
When I select "All" from the combo box, I get the following error:
"Run-time Error '13':
Type Mismatch"
Can anyone assist? Thank you in advance for your assistance.
Sahaitu
I have a form that I would like to filter based on a selection in one combo box. I used the "Filter the Form Based on My Selection" wizard.
I have the following code in the combo box:
Private Sub Combo4_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[idnStateID] = " & Str(Nz(Me![Combo4], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I then have the following code in the query behind the combo box:
SELECT tblState.idnStateID, tblState.StateLong FROM tblState UNION SELECT "*", "All" FROM tblState;
When I select "All" from the combo box, I get the following error:
"Run-time Error '13':
Type Mismatch"
Can anyone assist? Thank you in advance for your assistance.
Sahaitu