Popping Microsoft Access ® 2000 and 2002
Introduction
So, you have a Microsoft Access database containing your customer contacts and want the contact information for the caller to pop up as the telephone rings, can you do this - YES!
This article tells you how, and we include an example, source code and full explaination of how we do it.
Microsoft Access
Microsoft Access is one of the worlds favourit database solutions, designing your own forms for data imput and retreival is relatively easy and you can customise your solution to fit your needs. Adding screen popping to your solution is simple and requires very little programming to achieve good results.
Our aim is simply to add the Direct Dialer control to a form, This form should be open to allow the direct dialer controller to respond to incoming calls. When a incoming call is received the conrol will fire an event which in turn executes a section of code to open the contact form showing the details of the caller.
We have provided a simple access database sample demonstrating this functionality, which you may study and apply to your own solution.
In this solution we are going to do three main tasks
1. Add a manual lookup to a form, to open a contacts form using a manually entered telephone number and button.
2. Add the direct dialer control to the form.
3. Add the code to pop the Contacts form.
Manually Popping a Contacts Form
We will use the sample database as a guide, we have created a table 'contact' to store only basic information as shown below, we would expect you to already have a table containing the contact information and a form to display it.

As you can see we have to Telephone number fields TelNumber and MobileNumber, you could have more. We have also created a simple form to view this information.

Now we will create a main menu form from which to pop the contacts form.
First create a blank form in design view.

Resize the new form, then close and name it. Then open the form again in design mode.
Now add a edit box to the form, sixe it as you wish and name the edit control 'TelephoneNumber'.

Next add a command button to the form to open the contacts form. Select Form Operations and Open Form

Next select the Contact Form and click next

Select the Open the form and find specific data to display option.

Then select the TelephoneNumber from the MainMenu form and link it to the TelNumber on the contacts form.

Select the Text option and label the button.

give the button a name.

Finally position the button on the Main form and close the form to save it.

You should now have a main menu form with a edit box where you enter a telephone number and a button that when clicked will open the contacts form and find the record with the entered telephone number.

Adding Direct Dialer to pop the form
Now we have the manual popping code in place we will add the Direct Dialer control. Once again open the Main Menu form in design view.
First select the Direct Dialer control from the More Controls Toolbar selection.

Add and position the control on the form

Right click the control to display the properties. Rename the control to DDCtrl (this just makes it easier to understand the code later).

Scroll down to find the Custom Property, and click the button on the right. This will display the controls property page,

Select or modify the controls properties - see the Direct Dialer Help for full details of these. Don't worry if the properties do not appear to update when you close the Controls property page, they will when you close the main property page window.
For the main form we have hidden the dail and hang up button.
Closer the form to save the changes.
Adding the event handling code to pop the contacts page.
Open the Main Menu form in design view, right click the Open Contacts Btn control to display its properties. Click on the button next to the On Clock [Event Procedure]

This opens the Visual Basic Editor and displays the code that opens the contacts page when you click on the button.

Now select the DDctrl object from the available objects

Followed by the InComingCall event

This will add the event handling subroutine to the code.

Now copy and past the code from the OpenContactBtn_Click funtion into the incoming call function.

Now change the strLinkCriteria line to make the TelNumber equal the incoming callers number, We have also just chenged the names of the labels for consistancy.
Close the visual basic editor and close the form to save the changes.