search on a memofield doesn't work

C

Co

Hi All,

I have a vb.net program where I want to search from a access database
in a memofield.

strFilter & "[samenvatting] Like " & Chr(34) & Chr(42) &
tbFreetext.Text & Chr(42) & Chr(34) & " AND "

When I create the query in access I can find things but when I do it
in vb.net it doesn't find anything.

What am I doing wrong?

Marco
 
J

John Spencer

I don't know that this will help but try writing it without using the
Chr() function.

strFilter & "[samenvatting] Like """*" & tbFreetext.Text & "*"" AND "

If that fails try
strFilter & "[samenvatting] Like "'%*" & tbFreetext.Text & "%' AND "


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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

Top