remove spaces from the middle of a field.

the-m0th

Registered User.
Local time
Today, 04:02
Joined
Apr 14, 2015
Messages
51
hi everyone,

i'm trying to improve the dialler that i place on microsoft access forms. basically there's a command button that dials the number that is in a text box, but we have a new job that's just come in that requires numbers to be copied and pasted into the text box. these numbers have a space between the dialing code and the telephone number and i need to make the dialler check for a space and remove it before dialling. i'm totally lost on how to do this.

here's the code for the dialling button if it helps:-

Code:
Private Sub cmd_Dial_Click()
On Error GoTo Err_cmd_dial_Click
    CT.MakeCall "8" & txt_telephone.Value & "#", "", False, "", "", False
    'MsgBox "Hello World", vbOKOnly + vbCritical, "Title"
    Exit Sub
    
Err_cmd_dial_Click:
    MsgBox Err.Description
End Sub

thanks
Wayne
 
got it, cheers mate.
 
I did it by creating a new text box & in it's control source put:
=Replace([Phone 1]," ","")

[Phone1] is the original field containing the phone number with a space.
 

Users who are viewing this thread

Back
Top Bottom