Results 1 to 14 of 14
  1. #1
    Join Date
    Apr 2008
    Posts
    8

    Unanswered: Very simple email question

    I have set up a field into which I am typing e-mail addresses (there seems to be no special e-mail data definition in Access 2003 Design View). By clicking on the e-mail address, I want to cause an e-mail browser to open (preferably Eudora). How to achieve this?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You can use SendObject or FollowHyperLink (with "MailTo:") in VBA. Either one I think will use the default mail client on the PC.
    Paul

  3. #3
    Join Date
    Apr 2008
    Posts
    8
    Sorry, I am a new user. Could you expand? What's SendObject? What's FollowHyperlink? What is 'MailTo'? What is VBA? Where do I find them?

    I just want something simple, every contact manager allows one to click on e-mail addresses to send e-mails.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    1. Create yourself a form using the wizards.
    2. enter design view
    3. right click the textbox containing the email address
    4. chose properties
    5. click on the events tab
    6. put your cursor in the textbox next to "On Click" or "On Dbl Click"
    7. click on the "..." button on the right that appears
    8. chose code builder
    9. Copy and paste this code
      Code:
      DoCmd.SendObject acSendNoObject, , , Me.<name of email address textbox>.Value, , , "<This is the email subject>", "<some message text>", True
    10. update the code as necessary
    11. save the form and give it a try!
    George
    Home | Blog

  5. #5
    Join Date
    Apr 2008
    Posts
    8
    What will be the result? This? - When I'm in an Access table and I click on an e-mail address, the program will open Eudora, and the address will appear already nicely typed in the 'to:' field?

    That's what I want.

    That's what happens if you click on an e-mail address in Word.

    Practically every contact manager in existence offers this, I'm really surprised and puzzled that Access doesn't have it already built in.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    A table contains nothing more than data; no special functionality.

    You should not be accessing the table directly, instead, you should be using some sort of interface (i.e. a form!).

    With a form you can add all the lovely functionality you want; above I posted a step by step workflow of how to create this yourself.

    Give it a go and see how you get on
    George
    Home | Blog

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    If you are insistant on using the table directly then you do have one option...

    Set the field's datatype to hyperlink and type
    mailto:test@test.com
    The mailto: bit is the key here.
    George
    Home | Blog

  8. #8
    Join Date
    Apr 2008
    Posts
    8
    OK I get this far:
    1 Create yourself a form using the wizards.
    2 enter Design view
    3 right click the textbox containing the email address
    4 choose properties
    5 click on the events tab
    6 put your cursor in the textbox next to "On Click" or "On Dbl Click"
    7 click on the "..." button on the right that appears
    8 chose code builder

    Then I get the error message:

    "You can't refer to a form or report module from Form view or Report preview if the form's or report's HasModule is set to No.

    Switch to Design view or set the HasModule to Yes in order to refer to the module"

    This is puzzling. I cannot find any HasModule. When I switch to Design view, the Event box is empty and has no choices in it. What to do?

  9. #9
    Join Date
    Apr 2008
    Posts
    8
    Why should I not be accessing the table directly? It's more convenient. I don't like the way forms present data, vertically. I want my data on a horizontal line, and the way the table presents it is just fine for me.

  10. #10
    Join Date
    Apr 2008
    Posts
    8
    This "mailto:" it still doesn't seem to work like clicking an e-mail address in Word. I click and nothing happens.

  11. #11
    Join Date
    Apr 2008
    Posts
    8
    Alpha 5, a rival database program widely seen as more intuitive and user-friendly, accepts accessing the data table in this way and therefore calls it the 'browse table'.

  12. #12
    Join Date
    Apr 2008
    Posts
    8
    Well this is quite frustrating, I cannot get my e-mail address to click and send. Why is this made so difficult?

  13. #13
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I think the question should read: why does it always appear so simple?

    The error message you recieved suggested you were not in design view.

    Why shouldn't you access directly? I am now assuming you are the only person accessing this access database, in which case be my guest to fiddle directly with the data. But in a multi-user environment it is a big no-no.

    It is best practice to remove direct data access from the use, because it makes it far too easy for them to screw it all up
    Programmers do their best to control and clean a users entry; have you ever noticed that you cannot put a "\" in a filename?

    Well, that's a prime example of programmers intevention! Direct table access doesn't allow much in the way of validation!

    With regards to the mailto bit; did you set the fields datatype to hyperlink as I advised? Did the text you type in go blue and underlined?

    Databases and programming are not simple beasts take many years to come even close to mastering. Unfortunately, as you have found, most users do not understand how something that appears to them to be "so simple" actually takes a lot more than expected!
    George
    Home | Blog

  14. #14
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Tis the nature of the beast that is making this difficult for you MP.

    When anyone tries to compare Word to Access, I feel the need to say this:

    Word is simple to setup and very difficult or impossible to maintain complex data. Data relationships don't exist.
    Excel is average at both. Setup can be awkward but manageable. Data relationships can be forced into existence with lots of VLOOKUP functions and it's still not perfect.
    Access is hard (by comparison) to setup but simple to maintain complex data. Data relationships are simple.

    Just design a continuous form MP. It can look almost exactly like a table, but it gives you high levels of control.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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