How to get the Caller ID by VBA?

Posted on 2008-10-14
Last Modified: 2013-11-28
How to use the PC connect telephone, when peple call then show the Caller ID on the PC (Access Form)?
Question by:Uncochen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22719651
Can you explain what this is:
  "PC connect telephone"

...or rephrase your question.



Accepted Solution

Rodger earned 500 total points
ID: 22721337
I think what you want is to have Caller ID in your access database?  I actually did this.  I have not used it in years.  Make sure your modem has Caller ID.

I borrowed most of the code and then modified it for what I was tring to do.  This of course was before I had dialup.  LOL.  I had it setup to page me when someone called the house.  (No clue why I did this, I think I just wanted something to do)  At the time I had distinctive ring on my phone so I would make sure it was the correct number ad then send out a page.  I marked the code where you need to change it for your phone number.  

Let me know how it goes.  Maybe I'll set it back up.

Author Comment

ID: 22726668
Hi RodgerDjr, This file you send to me, had miss some kind of .ocx files. it is not working.

My idea is when the customer call my phone, then the system will search the database, if the database have this Caller ID then display the details, like "Name", "Address".........if no this Caller ID record then the system allow to add in to the database.

The hard thing for me is how the get the Caller ID(Telepone number) from the phone, and I not sure how to connect the telepone to Computer, is it connect to the modem ?
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.


Expert Comment

ID: 22727189
Oh that is right you need that OCX file.  IS it giving an error that you do not have the comm32.ocx installed?  Also does the PC have a modem if not you will need one and you will want to make sure that it has caller ID, I am pretty sure most of the new ones do.  

The concept you want to do will work and it is a great idea this way when the customer calls it will pull up their record.  

What kinda of modem do you have?

Author Comment

ID: 22738944
Just a normal modem, PCI socket, so is it connect the phone line to the modem right? and try to read  caller ID from the modem by some kind of port right? do you have any reference about this? thank you!

Expert Comment

ID: 22739202
The main form will display the data when the phone rings and you will see the info there.  But you have to make sure that the modem will read the caller ID info sent from the phone comapny.  Go into the setting for your modem and query the modem see if it list anything about caller ID.

Expert Comment

ID: 23064448
Sorry just getting back  to this.  I was on vacation for a while and now I am back.  I'll try and work on getting mine working again.  I have moved since I had it working plus it is a newer PC.

Author Comment

ID: 23214060
Hi RodgerDjr, Sorry, I can get the "CALLERID.CallerIDCtrl.1" ActiveX Controls in the frm_CallerID Form, is it possible you sent me one to my email please! my email is:
I did checking my modem by the Hyper Terminal, it works ok, can display the callerid! it means my modem support the callerID. but i try your program just can display Ring. ..Ring... Ring...... not display the CallerID details. do you know what happen? and when i click the "Open Port" button, it will display :




is it the country problem? I am in UK
Thank you very much!

Expert Comment

ID: 23214434
Yes that is the problem.  No I do not think that is the issue.  One thing that I remembered is the initialzation string needs to be correct.  If you are seeing 'ring' . . . 'ring', then we are on the right path.  if you type in AT#CID=1 does it return OK?  If you get an error then we need to find another AT command that will turn on CID.

Author Comment

ID: 23217835
that's right! I delete the "ATZ&ATS41=1&" then it works well. can turn CID and return to OK. Thank you very much for your time.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question