Query to retrieve part of a memo field

  • Thread starter Thread starter Zook
  • Start date Start date
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
 
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.
 
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.
 
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.
 
Back
Top