Findfirst

B

Bart

hi, im trying to find the record that has the same value as KlantI
KlantID is auto numbered
lstnaam is a listbox, the value that is entered in the listbox came from KlantI
but it says that the type of data isn't the same error 346

Dim rs As Objec
Set rs = Me.Recordset.Clon
rs.Findfirst "[KlantID] = '" & Me![lstNaam] & "'
Me.Bookmark = rs.Bookmar
 
T

Ted Allen

Hi Bart,

If the KlantID is a number, you should remove the single
quotes because they are causing the value to be passed as
a string rather than a number. Try the following:

rs.Findfirst "[KlantID] = " & Me![lstNaam]

HTH

Ted Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

FindFirst question 6
Textbox Filter 4
OnLoad event criteria 7
Search combo box 2
Problem with Combo Box FindNext 10
RunTime Error 3070 11
Error 2147352567 2
Searching 3

Top