Darren DICK
d.dick at uws.edu.au
Mon Dec 6 17:36:36 CST 2004
Thanks Heaps Vinnie
I have filed this one away :-))
see ya
DD
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Vincent Pusateri
Sent: Monday, 6 December 2004 2:01 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] A2003: Checking for dupe phone numbers
Hi Darren,
Here's a function that'll help.
Function NumbersOnly(T)
'VChas remove characters/spaces and just give us the numbers
Dim K, Result
If IsNull(T) Then
NumbersOnly = Null
Exit Function
End If
For K = 1 To Len(T)
If Asc(Mid(T, K, 1)) >= 48 And Asc(Mid(T, K, 1)) <= 57 Then
Result = Result & Mid(T, K, 1)
End If
Next
If Len(Result) = 0 Then
NumbersOnly = Null
Else
NumbersOnly = Result
End If
End Function
Vinnie Chas
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Sunday, December 05, 2004 6:38 PM
To: AccessD
Subject: [AccessD] A2003: Checking for dupe phone numbers
Hi Guys
I'm trying to comparing phone numbers and report dupes.
Basically I get a user to enter a phone number - then check if it is already
in the dB If it is then I go to the record that already has it.
But of course people legitimately put in spaces after area codas and after
the prefixes.
So it becomes tricky to compare
eg 01 1234 5678 is the same number as 0112345678 but a simple dlookup won't
catch it
So I wanna remove all the spaces so I am comparing at least the same
'number'
OR
Do any of you have a method for comparing or routing out dupe phone
numbers??
Many thanks in advance
Darren
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com