afterupdate code

  • Thread starter Thread starter leon
  • Start date Start date
L

leon

I put the undermentioned code in the after_update event of a combobox.
However this does not work. I get a tyoe mismatch eror. This is most
probably due to the fact that [naam] is a text value and not a number.
Only thing is i don't know what i have to change in the code to make
it work. Any ideas are more than welcome.

Set rs = Me.Recordset.Clone
rs.FindFirst "[naam] = " & Str(Nz(Me![Combo0], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
Surround the string value with quote marks - Chr(34) - or with apostrophes.

rs.FindFirst "[naam] = " & Chr(34) & Str(Nz(Me![Combo0],"0")) & Chr(34)
or
rs.FindFirst "[naam] = '" & Str(Nz(Me![Combo0],"0")) & "'"
 

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

Textbox Filter 4
Search combo box 2
runtime error 13 2
RunTime Error 3070 8
Combo Box recordset problem 2
OnLoad event criteria 4
recordset.clone 13
Combo box & clustered key blues 3

Back
Top