Runtime error 3464

abzalali

Registered User.
Local time
Today, 18:47
Joined
Dec 12, 2012
Messages
118
Dear Expert,
I'm getting run-time error with this code below:
Code:
Private Sub cboInv_AfterUpdate()
    Dim rs As Object
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[InvoiceNumber] = " & Str(Nz(Me![cboInv], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Please help me.

Thanks
Mir
 
What is the full error message abzalali? 3464 means nothing to me.
 
Why are you using Str()?
If InvoiceNumber is a text data type you could try

rs.FindFirst "[InvoiceNumber] = '" & Str(Nz(Me![cboInv], 0)) & "'" but

do you really have an InvoiceNumber "0"?
 
Thanks all of you, it's data type mismatch in criteria expression.
[InvoiceNumber] and [cboInv] both are text not number
 
Ok, for next time please include the error message and not just the error code.
 
Dear jDraw,
Done with this code and thank you very much.
Code:
Dim rs As Object
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[InvoiceNumber] =  '" & Me![cboInv] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
Dear vbaInet,
Next time this will not happen by me. I'm really sorry for that.

Thanks Mir
 
Ditto --vbaInet is just tooooo fast!
 

Users who are viewing this thread

Back
Top Bottom