Findfirst

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top