Formatting data

  • Thread starter Thread starter Alex H
  • Start date Start date
A

Alex H

Hi

We have a database with a text field which is used for fax Numbers.

They appear to be formatted in one of two ways:
1. +44 (01234) 567890
2. 01234-567890

I need to reformat the data so that it can be used by Microsoft Fax
software.

Has anyone any ideas please?

Thanks

Alex
 
Does Microsoft Fax require just numbers ?
If yes you just need to create a string from the field that takes out all
the non-numeric characters something like

Private Sub Command2_Click()
mystring = Me.Text0.Value
newstring = ""
mylgth = Len(mystring)
For i = 1 To mylgth - 1
If IsNumeric(Mid(mystring, i, 1)) Then
newstring = newstring & Mid(mystring, i, 1)
End If
Next
Debug.Print newstring
End Sub
 
Back
Top