M
Miranda
I am trying to create a search field [Combo41] on a form and keep running
into a Type mismatch error. I have based the combo box on a Simple Query
("CustomerQuery") (that part works) and am running the following code on the
AfterUpdate property:
Private Sub Combo41_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CustomerID] = " & Str(Nz(Me![Combo41], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
When I locate the record I want from the query and select it, that's when I
get the error. I am using the same code in two other databases and it works
fine, so I'm not sure what is different about this one. Thanks for any help
I can get.
into a Type mismatch error. I have based the combo box on a Simple Query
("CustomerQuery") (that part works) and am running the following code on the
AfterUpdate property:
Private Sub Combo41_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CustomerID] = " & Str(Nz(Me![Combo41], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
When I locate the record I want from the query and select it, that's when I
get the error. I am using the same code in two other databases and it works
fine, so I'm not sure what is different about this one. Thanks for any help
I can get.