Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Me.field value duplicated (2003)

    I am using the following to grab an email address value from a field called "ResourceEmail" and launch the email client.

    Private Sub ResourceEmail_DblClick(Cancel As Integer)
    DoCmd.SendObject , , , Me.ResourceEmail
    End Sub

    However the value for Resource email gets duplicated, entering the email address twice (i.e. johns@hotmail.comjohns@hotmail.com)
    Haven't seen this before with this same code. Any ideas on what might be causing this? Thank you.

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

    Re: Me.field value duplicated (2003)

    I have never seen this. Does the problem persist
    - after closing and reopening the form?
    - after closing and reopening the database?
    - after restarting your PC?

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Me.field value duplicated (2003)

    Hans,
    Yes, the problem persists after those steps.
    Thank you.
    -Scott

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

    Re: Me.field value duplicated (2003)

    Hmm... Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Me.field value duplicated (2003)

    I came across a similar problem recently.
    The address would appear as johns@hotmail.com#mailto:johns@hotmail.com#

    If the field is formatted as a hyperlink field it actually stores both a Display Text and an Email Address, and the code in the double click event copies both of them.
    If the field is a Hyperlink field, you should be able to launch your email programme with a double click without having any code in the double click event.
    Regards
    John



  6. #6
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Me.field value duplicated (2003)

    The field is a text field, nvarchar 50 characters in length (tables are on a sql server). No additional formarting applied through the form within Access. I will pare it down and attached. Thank you.

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Me.field value duplicated (2003)

    If it is a textfield you could try this

    Dim strEmailAddress as string
    strEmailAddress = "mailto:" & me!ResourceEmail
    Application.FollowHyperlink strEmailAddress, , True
    Regards
    John



  8. #8
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Me.field value duplicated (2003)

    Here is the stripped down mdb. It contains one table and one form.
    Thank you again for your help.
    -Scott

  9. #9
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Me.field value duplicated (2003)

    Did you test the stripped down version?

    For me it behaves perfectly.
    Regards
    John



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

    Re: Me.field value duplicated (2003)

    It works correctly for me too - mo duplication of the e-mail address.

  11. #11
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Me.field value duplicated (2003)

    It has something to do with my work pc's. When I run the code on my home pc it works fine. At work even the stripped down version continues to duplicate. We run Novell's EDirectory at work..I wonder if that may have something to do with it. I'll try the other suggested approach and see if I get any different results. Thank you both for your taking the time to look at this. - Scott

Posting Permissions

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