Results 1 to 12 of 12
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Input Mask Blows up with Winfax (97 )

    OMG I hope you can help. I've taken over a database that is in 97. It is running fine except that the fax field doesn't allow them to enter the fax. The person who wrote the database (no longer available) had this control as unbound and =phone. I changed the control to being bound to phone and that worked fine, till they went to fax that night and any new faxes they entered blew up. I went in a looked at the "new" entries and the input mask was not correct so I changed the input mask to
    !"+1 ("999") "000-0000;;
    This input mask is on the form as well as in the table. Everything "looks" fine. However they still blow up everytime they try to fax anything new that is added. I've not used winfax before so am totally in the dark. I'm wondering if there is something in the code that is blowing up. The fax code is as follows:

    Sub Command6_Click()
    'Fax All
    Dim rs As Recordset
    Set rs = Me.RecordsetClone
    Dim chan As Variant
    Dim vNum As Variant
    Dim ChanNum As Variant

    'ChanNum = DDEInitiate("FAXMNG32", "CONTROL")
    'DDEExecute ChanNum, "GoIdle"
    'DDETerminate ChanNum

    'chan = DDEInitiate("FAXMNG32", "Transmit")


    rs.MoveLast
    rs.MoveFirst
    Do While True
    If rs.EOF Then
    Exit Do
    End If
    DoEvents
    'DDEPoke chan, "Fax Number", rs![Phone]

    Dim recpstr As String


    recpstr = "recipient(""" & rs![Phone] & """)"
    'MsgBox recpstr
    chan = DDEInitiate("FAXMNG32", "TRANSMIT")
    DoEvents
    DDEPoke chan, "sendfax", recpstr
    'DDEPoke chan, "sendfax", "showsendscreen(""0"")"
    DoEvents
    DoCmd.OpenReport "aaprint", , , "[vendor list].[vendor name] = '" & rs![FirstOfVendor Name] & "'"
    DDETerminate chan
    DoEvents
    vNum = rs![Vendor Number]
    DoCmd.SetWarnings False
    DoCmd.RunSQL "UPDATE DISTINCTROW [RFQ Details] SET [RFQ Details].[Quote Faxed] = True WHERE ((([RFQ Details].[Quote Faxed])<>Yes) AND (([RFQ Details].[Vendor Number])= " & vNum & "));"
    sSleep (5000)
    rs.MoveNext
    Loop

    'ChanNum = DDEInitiate("FAXMNG32", "CONTROL")
    'DDEExecute ChanNum, "GoActive"
    'DDETerminate ChanNum
    'DDETerminateAll

    End Sub

    Does anything look off????

    Thanks,
    Leesha.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Mask Blows up with Winfax (97 )

    You'll have to find out in which format WinFax expects the fax number. The input mask as it is will not store the extra characters: if you enter 415 526 1685 it will look like

    +1 (415) 526-1685

    but the actual value of the field will be

    4155261685

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input Mask Blows up with Winfax (97 )

    Hi Hans,

    Please bear with me on this one as I feel totally blind. I'm confused by your answer. When I did a test input with the input mask this is the result that is in the table:

    +1 (860) 889-2084. That is how it appears. Does this mean when its sent to winfax it looks different than how it appears in the table? All the other faxes that were in the table prior to my changes look the same as the one I just gave you as a sample.

    Leesha

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Mask Blows up with Winfax (97 )

    The reason you see +1 (860) 889-2084 is the input mask. If you were to clear the input mask, you'd see 8608892084. This is the value actually stored in the table, and also the value passed to WinFax.

    I have no idea what kind of format WinFax expects, so you'll have to find out by experimenting. Or perhaps a Lounger from the USA who uses WinFax can tell you.

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input Mask Blows up with Winfax (97 )

    Ok, that makes sense. I'm not sure what the format is that winfax wants and am trying to get that. I "think" its +1 (972) 496-7425. The reason I say this is because when I remove the input mask from the [phone] control in the table, the ones that work appear this way. Now my question is, where do I put that so that its either entered into the table correctly and "seen" by winfax in the correct format OR is converted when its sent to winfax. I'm totally clueless here and since I didn't build the database that doesn't help.

  6. #6
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Mask Blows up with Winfax (97 )

    I haven't worked with Winfax but have used fax software off and on and it seems that Winfax is looking for the "+1" to dial a long-distance fax number. Up here in Canada, they have now implemented 10 digit numbers for all phone calls, local and long distance, so if that is an issue, you will have to deal with deciding whether the call is local or long distance and build that into your code. A simple IIf to choose ought to do it If...Then...Else for recpstr.
    If Left("rs![Phone]",3) = "999) then
    recpstr = "recipient(+"& rs![Phone] & """)"
    Else
    recpstr = "recipient(+1"& rs![Phone] & """)"
    End if
    (Hopefully I got the quotes right. I hate working with triple quotes. This is where Chr(34) is nice so you can see what is really going on!)

    I am working on the assumption that Winfax wants the plus sign and suggesting, since the phone number stored in the table is not including the 1, that you hard code it in the Winfax procedure.

    Also, a way to trouble shoot if the procedure is working at all is to try hard coding a valid fax number you can test like so:
    recpstr = "+15551231234" and see what happens. Then you'll know if the problem is in the procedure or in how data is being stored in the table as Hans suggested.

    Hope this helps

  7. #7
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input Mask Blows up with Winfax (97 )

    Hi Peter,

    Thanks for the input. Since I'm working with code someone else wrote (I have a hard enough time with my own code) I want to be sure I insert your suggested IF statement in the correct spot. Where exactly would you put it in the above code?

    Thanks,
    Leesha

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Mask Blows up with Winfax (97 )

    Try to send two faxes through WinFax to yourself or to someone you can ask to collaborate with you. For one of them, use a number in the form +1 (972) 496-7425, and for the other, use a number in the form 9724967425. See which of the faxes get through. That should give you an idea which format is OK.

  9. #9
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Mask Blows up with Winfax (97 )

    Right after Dim recpstr As String

    Replace recpstr = "recipient(""" & rs![Phone] & """)" with the IF statement. This is based on the assumption that your area now requires 10 digit numbers for local calls as ours does and that some of your faxes will be local. Also you might get an error with the various quote signs.

    The IF statement is just a way to dial 1 for long distance and not for local. Ideally, if you can make Hans' advice work, it will be simplest because it just occurred to me that it is possible have local and long distance within the same area code depending on the geography covered.

  10. #10
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input Mask Blows up with Winfax (97 )

    Hi,

    I took off the input masks on both the form and the table and entered my fax number in the following format 18604440000 and it worked. The user is now just typing in the fax like above and is fine without the input mask. I figure I'd better leave well enough alone now that its working. Especially since I now need to return to the emailing from Access that I was working on last week. My head is already starting to pound!

    Thanks,
    Leesha

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Mask Blows up with Winfax (97 )

    Good decision. I'm not keen on input masks anyway, I almost never use them in my databases.

  12. #12
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input Mask Blows up with Winfax (97 )

    It was very helpful to have you explain that the mask just sets the appearance of how the data is entered. The user prefers how the data looks with the input mask as it's "prettier" but as I nicely pointed out, if it doesn't work, pretty is useless!!!

    Thanks again,
    Leesha

Posting Permissions

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