Memo Search

P

PeterM

I am trying to setup a listbox that searches a memo field in a table. I
create the SQL in VBA and then set the rowsource to the created SQL. They
all work fine except for the find within a memo field.

SELECT Appointments.*
FROM Appointments
WHERE Appointments.AP_Comments like '%REHAB%';

Is there something special when working with a memo field?
What am I doing wrong?

Thanks for your help!
 
A

Arvin Meyer [MVP]

VBA doesn't use the % sign for a wildcard, it uses the asterisk:

WHERE Appointments.AP_Comments like "*REHAB*";
 
S

Steve

Maybe you should consider a revision to your tables! If you are storing data
in a memo field, that data should be stores in a table. Memo fields are
99.99% of the time used for notes.

Steve
(e-mail address removed)
 

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