Sarah said:
I am looking for a way to find date values in an alphanumeric field in a
table. Here is an example of what fields might be:
em to rd 4/3/08 rvw 4/10/08 hold repairs 3/5/07
rvw 7/5/08 em to rd 06/23/08 rvw for funds
How do I figure out how to write an expression that would find these date
values in these strings and display them? Thank you.
You would have to try to determine the "configurations" that might represent
dates, write code to search for those "configurations", and display them...
it's easy to read the text and say, "Ah, that's a date" but with all the
potential formats (and finger-fumble errors) possible, not as easy to
recognize them in code.
From your examples, the verbal description would be "a delimiter followed
one or two numbers followed by a forward slash followed by one or two
numbers followed by a forward slash followed by one to four numbers,
followed by a delimiter or end of string". But that's not the only way the
data might have been entered, and you'll have to decide what you are going
to do with the dates after you detect them, and how you present them to the
user (in context would be best), so the user can decide if the application's
tenative guess at its being a date is correct, and what to do with that
particular date.
Full-text search (of which this is a subset) can be a full-time, lifetime
career. Hope for more or less well structured notes, and play it from
there.
Larry Linson
Microsoft Office Access MVP