Query to retrieve part of a memo field

Z

Zook

Hi,
I intend to retrieve a part of a memo field, using a
select query. For instance if the memo field contains
'name,number,address', is it possible to retrieve only
the number part of it for all records present ?

Regards,
Zook
 
G

Guest

You can't do anything within the query for a Memo field. You will have to generate a recordset in code, set a string variable = to the Memo field, then parse out what you want. Memo fields aren't too useful unless you can't get everthing into 255 characters. You might try splitting the information up into several fields and making them Text, which can be parsed in the query.
 
J

John Spencer (MVP)

Yes, it is possible. It depends on the actual structure of the data in the memo
field and how regular the data is in the memo field. Take a look at the various
vba string functions - InStr, Left, Right, Mid, etc.
 
G

Guest

Oops, my bad
I thought Access treated the Memo data type as a BLOB, therefore you couldn't use any string functions. I just tested it and I was wrong. Sorry.
 

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