"Tony_VBACoder" <(E-Mail Removed)> wrote in
message news:61E7C03A-FA33-4307-BDB9-(E-Mail Removed)
> Dirk and Doug, thanks for the assistance. I had the looping routine
> written, but was concerned about string variables being truncated
> because memo fields can be virtually anything. This brings me to
> Dirk's suggestion of using the Instr function. Won't Access "choke"
> using Instr on a memo field because a memo field could be virtually
> anything?
I don't follow you. A memo field will always contain text, though it
might be in "rich text format".
> Also, in my situation, Instr, will not work, because I have to find
> many instances of various values and then whatever follows that
> value. For instance, I have to search for FirstName and then
> whatever is after FirstName, to come up with the person's first name.
> But yes, that was a great suggestion.
I don't see the problem. You can search repeatedly for the same or
different strings, and once you've found the occurrence you want, you
can scan forward from that position for a delimiting character of some
sort.
Note that the InStr() function has an optional <Start> argument, which
can be used to specify the starting point for the search, within the
text being searched. That lets you keep searching for new occurrences
until there aren't any more, and it lets you search for (e.g.) the end
of the first name, once you've found the word "FirstName".
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)