Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    syntax change from A2k to A02? (Access 2002 (2k format))

    Hi All,
    I've got a why is this happening question.
    When using the following line of code with Access 2k and Outlook 2k

    .MAPIAddRecipient stPerson:=strEmailRecipient, intAddressType:=1

    and strEmailRecipient has the following syntax

    strEmailRecipient = Chr(34) & ctl.Column(1, itm) & Chr(34)
    (seen as ""anyone@anywhere"")

    everything is well and good.
    But using the same line of code in Access 02 (2k format) and Outlook 02 and that same
    strEmailRecipient, I get an Outlook error, when Outlook is resolving the address, stating that it
    does not recognize that as a valid email address. If I use the following as strEmailRecipient

    strEmailRecipient = ctl.Column(1, itm)
    (seen as "anyone@anywhere")

    again everything is well and good.
    So I am just curious as to why the extra set of double quotes was OK before and not now.
    Thank You.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: syntax change from A2k to A02? (Access 2002 (2k format))

    Why were you using the chr(34) before? There isn't any need for it that I can see, and apparently Outlook 2002 is less forgiving about resolving addresses wrapped in those extra quotes.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax change from A2k to A02? (Access 2002 (2k format))

    Hi Charlotte,
    I wasn't thinking and just used the strEMailRecipient as it was since it is used in the Where clause of an SQL statement later in the code as well.
    Thanks. Just must be that OL02 is tighter.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

Posting Permissions

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