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 ?
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

734 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