PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
dial using modem fax-VBForums
Results 1 to 17 of 17

Thread: dial using modem fax

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Lightbulb dial using modem fax

    hey,

    I've an mdb database with vba code and would to dial the customer number upon clicking on their phone number.

    what are the options for dialing using vba and a modem/ fax card?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    anyone?

  3. #3
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: dial using modem fax

    bambo:

    I am not sure how you do it in VBA, but this is how I do it in VB 6.0.
    Maybe you can modify this somewhat to work for you.
    First I add an MSCOMM object to the form and name it comOne. Then I add the following code to the DblClick event of the text box that contains the phone number.
    VB Code:
    1. Private Sub txtPhone_DblClick()
    2.     Dim strA As String
    3.     strA = txtPhone.Text
    4.     If strA = "" Then
    5.         MsgBox "Mark and copy a number first."
    6.         Exit Sub
    7.     End If
    8.     comOne.CommPort = 3
    9.     comOne.Settings = "9600,N,8,1"
    10.     comOne.PortOpen = True
    11.     comOne.Output = "ATDT" & strA & vbCr
    12.     MsgBox "Dialing " & strA & vbCrLf & "Pickup the phone"
    13.         comOne.PortOpen = False  
    14. End Sub
    In the code you have to set comOne.CommPort = to whatever com port you are going to use.

    I don't know if VBA can reference an MSCOMM object or not.

    Hope this helps you.

    Good Luck

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    thank you for the code and sorry for the late response

    When I run the code it works ok and I get the message box but the modem is not dialing at all.

  5. #5
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: dial using modem fax

    bambo:

    "When I run the code it works ok and I get the message box but the modem is not dialing at all."

    Sounds to me like the modem is not getting activated.
    You need to check and see which com port your modem is using.
    Then you will need to change this code accordingly:
    comOne.CommPort = 3

    Is your modem using Comm Port 3? Change this number to whatever comm port your modem is using.

    You may also have to change this code to whatever is appropriate for your modem:
    comOne.Settings = "9600,N,8,1"
    AND:
    comOne.Output = "ATDT" & strA & vbCr

    I don't really know what else to tell you to try, because I don't know VBA very well, but if the code runs but the modem won't dial then I guess the only thing you can do is to try and make adjustments like I suggested above.

    Maybe someone else who knows VBA well will see your posting and can give you a better answer. Sorry it didn't work.

    Good Luck

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    1. I change the port to the modem port but now I get runtime error 8012 - the device is not open.

    2. how can I check for the right comone.settings of my modem?

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    I tried your code in VB6 and it still gives me the same error "the device is not open"

  8. #8
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: dial using modem fax

    bambo:

    I don't know what operating system you are using, Win 98, Win 2000, Win XP, but you should be able to go to Control Panel and click on Modem and obtain the modem setting information.

    "I tried your code in VB6 and it still gives me the same error "the device is not open""

    I don't know what else I can tell you.

    The code above works just fine for me. I have Windows 2000 Pro and I am using Visual Basic 6.0 with SP6 and a Creative Modem Blaster V.92 on Com 3.

    I have shared the above code with several other people and as far as I know it worked for them.

    Without being able to sit down at your computer and check some settings there isn't much else I can tell you.

    I don't know where you are, but I think the code: comOne.Output = "ATDT" & strA & vbCr is for U.S.A. only, so if you are in another country you may need to have different settings there.

    NOTE: This will not work if you are already using your phone line for Internet access. If you are on a dial-up internet connection and you are online, your modem will already be in use and this code will not work.

    There is probably some modem guru around here that could give you a better solution that I have, but since no one was responding to your posting I thought I would share some code that works for me.

    I still think this code will work if you find out what com port your modem is on and use that com port in the code, but I don't know.

    Sorry it won't work for you.

    Good Luck

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    Thank you for the code and the efforts AIS4U.

    This modem issue is turning to be a real problem.

    Does anyone here knows what to do?

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    anyone?

  11. #11
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: dial using modem fax

    bambo:
    I had the similar dilema. Getting a 8012 error from MsComm when I tried to use a '.PortOpen = true'.

    I found a reference to MS Fax in some obscure dB post.

    I unistalled the Fax service from the WinXP control panel and everything is working fine (no 8012 error).

    It appears the WinXp 'holds' a modem of the system, just in case you want to send a fax.

    I hope it helps.

    Blue Shark

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    Blue Shark:

    It's good to know that.

    I'm using microsoft fax service (fax console) and would like to be able to dial regardless of using other fax services.

    any suggestions?

  13. #13
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: dial using modem fax

    bambo,
    According to what I have encountered throught Microsofts KB, Google searches and my own experience. The Microsoft Fax Service (Fax Service), will not share the MODEM port, if you have the Fax Service configuration set to automaticly receive.
    Fax Service monitors the MODEM port for incoming faxes. With this being the case, the MODEM port is occupied by the Fax Service.

    Here are three possible solutions, albeit, many more solutions are out there;
    1) (Manual) disable the auto answer feature in Fax Service
    2) (Automatic/API) write some code to release and establish (enable/disable) Fax Services.
    3) install an additional MODEM.

    Your programs end goal, will probably impact the selection of one of the above items or some other creative alternative.

    R/
    Blue Shark

  14. #14
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: dial using modem fax

    In order to contiune using microsoft fax service (fax console) with other programs. i.e. fax services, I would recomment using the TAPI component.
    TAPI compliant components can share a port with other TAPI compliant components.

    MScomm is not TAPi complient. To continue using the MScomm you are going to have to make several calls to the WIndows Fax Service (FAXCOMEXLIB) and the TAPI APIs.

    Blue Shark

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    do you any code exmaple for using tapi dialing, or maybe a link?

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: dial using modem fax

    anyone?

  17. #17
    New Member
    Join Date
    Nov 2009
    Posts
    1

    Re: dial using modem fax

    Error 8012 - the device is not open
    I fixed it as follows:

    In "My Computer" open "Printers and Faxes" which is a sub folder of "Control Panel"

    One of the items is FAX with a status of Ready. Right click this item and select Properties
    Click the "devices" tab. It should display your modem's name with send=yes receive=no

    If receive is auto or manual error 8012 is generated

    Right click the modem name and select "receive" "disable" and then click "Apply". Receive should now be "no". Click OK

    Error 8012 was fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width