Dialing from Access Form

I have a form in Access where I store my supplier database. One of the field is 'phone no' . I have given a Auto Dialer button on the form which activates the phone dialer. But I have to manually punch in the  phone no to dial. Can a macro or a script be written so that when I click on the dialer it automatically picks up the no stored in the 'phone no' field and starts dialing or if not dialing , gets the no. ?
Advait KawthalkarSr. Manager ITAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JimMorganConnect With a Mentor Commented:
Myinfo:

The simplest way to do this is to have the button disabled until the user selects the phone number field.  Then enable the dial button.  This could be on the OnGotFocus event.  The button would be turned off in the OnLostFocus event.

The code behind the button would be
  DoCmd.RunCommand acCmdAutoDial

This will dial the number in the selected field.

In case the field has lost focus, you might want to put the code in the DoubleClick Event of the field.  I know that this will dial the field number.  You might have to check that there really was a number there before you ran the command.

If you wanted to use the dial button without selecting the field, you will have to hard code in the OnClick event to set focus to the phone field and then check to see if it has a value before calling the command.

Jim
0
 
Advait KawthalkarSr. Manager ITAuthor Commented:
Thanks Jim. I will test this at get back to you. But at the same time, my sincere thanks.

myinfo
0
All Courses

From novice to tech pro — start learning today.