query criteria by data layout?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

OK, so I'm trying to clean up some phone number data. some phone numbers
added to the database in it's old version (pre-Access) were entered as
(###)###-####, and they should be (###) ###-####. (for those not as
painfully anal as I am the difference is a space between the close parentesis
and the next number)

Is there a way to do a query so it looks for something like that? Not the
number itself, but how the numbers are laid out in the cell? I've also been
trying to do a query that would bring me all entries that are ##-###, but not
those that are ###-### -- similar request, right? Any help is appreciated.
 
Have you tried the following criteria

Field: YourPhoneNumberField
Criteria: Like "(###)###-####"

OR even
NOT Like "(###) #*"

As for the second query if you are looking for exactly that format (no leading
or trailing characters)

LIKE "##-###"

Look up WildCard in the online help for a discussion of the various wildcard
characters and a bit on how to use them.
 
Back
Top