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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Advait KawthalkarSr. Manager ITAuthor Commented:
Thanks Jim. I will test this at get back to you. But at the same time, my sincere thanks.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.