Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink on a form (2003)

    I have a form which has a req number which tells the analyst what project is which. I have a hyperlink button that they can click to send additional info and this hyperlink opens up outlook with my email address. How can automatically put the req number in the subject line of the email to indicate what req number this add info belongs to?

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

    Re: Hyperlink on a form (2003)

    Have you set the Hyperlink property of the button or do you use code? If the latter, what code (you can replace the real e-mail address with a dummy addrss)?

  3. #3
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    I have set the hyperlink property of the button.

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

    Re: Hyperlink on a form (2003)

    OK. Clear the Hyperlink property, and create an On Click event procedure for the command button like this, with the appropriate names and text substituted:

    Private Sub cmdMail_Click()
    Application.FollowHyperlink "mailto:bgates@microsoft.com?subject=Feedback on " & Me.ReqNum
    End Sub

  5. #5
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    Thanks. It works perfectly.

  6. #6
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    I was thinking of using this technique on another form to email us a form when a form closes. Is this possible or would I have to attach a report that shows a new request as an attachment.

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

    Re: Hyperlink on a form (2003)

    If you e-mail a form, it'll include all records. In general, it's better to mail a report, but there, you should also ensure that only the relevant record is included.

  8. #8
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    What code to the above code could I include to attach the report?

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

    Re: Hyperlink on a form (2003)

    You can't attach files using Application.FollowHyperlink. Instead, use DoCmd.SendObject:

    DoCmd.SendObject acSendReport, "NameOfReport", acFormatSNP, "you@somewhere.com", , , "Order Form", "Accompanying message", True

    The last argument indicates that the user can view and edit the message before sending it. If you want to send it straightaway, use False instead of True.

  10. #10
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    Is there any way to block the message box that says Microsoft outlook is trying to send you a message and just send it automatically?

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

    Re: Hyperlink on a form (2003)

    See <post#=317048>post 317048</post#> for some ways to deal with the Outlook security warning that is displayed when you send e-mails using code. The free utility ClickYes is the simplest to use.

  12. #12
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    Quick question... The database function that I am trying to do is the same as database that was built before I get here and it sends messages automatically on closing a form. This database was built with Access 97 and we converted but it still doesn't give those messages about sending an email. We are using the same server in both instances but one sends and the other pops up a dialog box before sending. What could be going on here? The person who built this previously is no longer here so I can't ask him.

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

    Re: Hyperlink on a form (2003)

    It depends on the version of Outlook. Older versions don't display the alert; Microisoft added it later in an attempt to prevent unwanted manipulation of e-mails by malware.

  14. #14
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink on a form (2003)

    We are using the same version of outlook to view the emails that are generated.

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

    Re: Hyperlink on a form (2003)

    Without seeing the databases, I cannot explain why they act differently in this respect.

Page 1 of 2 12 LastLast

Posting Permissions

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