Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Not sure whether this is at all possible or just another 'whim' of a managers colour supplement management techniques.
    The original spec was:
    • in my access database form, create me a button that sends the current record details in an e-mail to a specified e-mail account

    OK, can be done, needs writing, but no great shakes.

    Change request today:
    • in my access database form, create me a button that sends the current record details in an e-mail to a specified e-mail account and the link will be clickable by the recipient. When the link is clicked the recipient's workstation would automatically open the database, open the form, go to the selected record.


    If it is 'do-able' then I'll invest the time to research and write, but just want to know if anyone has come across this type of request previously.

    Thanks
    Alan

    Access 2007

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I think it is doable. (but I have not done it)

    You can add a /cmd switch to the end of the command line that starts Access.
    This code is from Access 2007 Help

    Code:
    "C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb" /cmd "Orders"
    This will open Northwind and pass it "Orders" as a parameter.

    Code:
    Public Sub CheckCommandLine() 
    ' Check the value returned by Command function and display ' the appropriate form. 
    If Command = "Orders" Then 
     	DoCmd.OpenForm "Orders" 
     ElseIf Command = "Employees" Then 
    	DoCmd.OpenForm "Employees" 
    Else 
     Exit Sub 
    End If 
    End Sub
    Command returns the value passed as the parameter after /cmd

    You can then create an autoExec macro to call this procedure.

    In your case the parameter would be the key field. So you would have a line that opened a form you specify, and build a "Where" clause to open it at the right record.
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks Jon, just needed that starter logic then it blossoms into a plan.
    Cheers
    Alan

Posting Permissions

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