Results 1 to 4 of 4
  1. #1
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48

    Emailing a hyperlink to a specific record in a form

    Hi There,

    I have set up a database which allows users to send an email to the CEO to approve a costing theres one final feature that my end users would like and I don't know if it is possible or not with an offline database. I would like a hyperlink or a link or some sort which the CEO can just click and it will take him to the specific record in the form.

    The database is on a shared drive on our server and only certain people will have access to it, it will be be mapped to drive A on their own individual machines so if there's some kind of link it would be to A://Costings Database/ followed by the specific record in the form.

    If it is not possible to go the specific record in the form would it be possible to simply open the form for him to view?. and then he filters using the filter feature at the bottom.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Its possible to provide a command line switch and submit the key index to the record
    msaccess.exe "c:\MyFolder\MyDatabase.accdb /cmd 3251"

    this would open your db and the command line would capture 3251
    this would open the form AT the given index.

    Code:
    Public Sub CheckCommandLine()
          ' Check the value returned by Command function and display
          ' the appropriate form.
        If Command <> "" Then
            DoCmd.OpenForm "frmData", ,,"[ID] = " & command
        Else
            DoCmd.OpenForm "frmData"
        End If
    End Sub
    see: https://msdn.microsoft.com/en-us/lib...ffice.11).aspx

  3. #3
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Quote Originally Posted by ranman256 View Post
    Its possible to provide a command line switch and submit the key index to the record
    msaccess.exe "c:\MyFolder\MyDatabase.accdb /cmd 3251"

    this would open your db and the command line would capture 3251
    this would open the form AT the given index.

    Code:
    Public Sub CheckCommandLine()
          ' Check the value returned by Command function and display
          ' the appropriate form.
        If Command <> "" Then
            DoCmd.OpenForm "frmData", ,,"[ID] = " & command
        Else
            DoCmd.OpenForm "frmData"
        End If
    End Sub
    see: https://msdn.microsoft.com/en-us/lib...ffice.11).aspx
    Would the number after cmd be the autonumber ID for the costing?. How would I make it go automatically to the record which has been sent could I use "me.ID" rather than [ID]? and this would allow him to view that specific record and approve or decline as necessary.

  4. #4
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Code:
    Private Sub Command561_Click()strMsg = "Hi Costing Team, " & vbCrLf & vbCrLf & "Costing Number " & Me.ID & " has been raised " & vbCrLf & "It was raised on: " & Me.Date & vbCrLf & _
    "By: " & Me.Staff & vbCrLf & "For the following customer: " & Me.Customer.Column(1) & vbCrLf & "With this Contract Code: " & Me.Contract & vbCrLf & vbCrLf & _
    "The Yr 1 Qty is: " & Me.Qty1 & vbCrLf & "HA Code: " & Me.HA & vbCrLf & "Product Description: " & Me.ProdDesc & vbCrLf & "Description Notes: " & Me.DescNote & vbCrLf & _
    "Class: " & Me.Class & vbCrLf & "Category: " & Me.Cat & vbCrLf & "Size Range: " & Me.SizeRan & vbCrLf & "Size Range Length: " & Me.SizeLen & vbCrLf & _
    "Supplier Name: " & Me.Supplier & vbCrLf & "Catalogue Code: " & Me.CatCode & vbCrLf & "Costing: " & Me.CMT & vbCrLf & "Fabric Status: " & Me.Status & vbCrLf & _
    "Fabric (£/$/€): " & Me.FabricCost & vbCrLf & "Exchange Rate: " & Me.ExchRate1.Column(1) & vbCrLf & "Cost Per Metre: " & Format(Me.CPM, "Currency") & vbCrLf & _
    "CMT Price per Item: " & Me.CMTTotPrice & vbCrLf & "Fully Factored Cost: " & Me.FFCost & vbCrLf & "Delivery Per M: " & Me.DPM & vbCrLf & _
    "Total Delivery Cost: " & Format(Me.TotDel, "Currency") & vbCrLf & "Delivery Cost per Item: " & Format(Me.DelCostItem, "Currency") & vbCrLf & _
    "Duty (%) : " & Format(Me.DutyP, "Percent") & vbCrLf & "Duty (£) : " & Format(Me.Duty, "Currency") & vbCrLf & "Agent (%) : " & Format(Me.AgentP, "Percent") & vbCrLf & _
    "Agent (£) : " & Format(Me.Agent, "Currency") & vbCrLf & "NI Embroidery per 000's: " & Me.NIEmbPer & vbCrLf & "Stitches per 000's : " & Format(Me.StitchesP, "Currency") & vbCrLf & _
    "NI Embroidery : " & Me.NIEmbPer & vbCrLf & "Other Embroidery : " & Me.OtherEmb & vbCrLf & "HunterPac : " & Me.Hunterpac & vbCrLf & _
    "Bought In Cost : " & Format(Me.BICost, "Currency") & vbCrLf & "Fully Landed Cost Per Item : " & Format(Me.FLCost, "Currency") & vbCrLf & _
    "Mark-up (%) : " & Format(Me.Mark_UpP, "Percent") & vbCrLf & "Mark-Up (£) : " & Format(Me.Mark_Up, "Currency") & vbCrLf & _
    "Prior Selling Price : " & Format(Me.PreSP, "Currency") & vbCrLf & "Total Selling Price (£) : " & Format(Me.TotSP, "Currency") & vbCrLf & _
    "Exchange Rate : " & Format(Me.ExchRate3, "Currency") & vbCrLf & "Total Selling Price (£/€/$): " & Me.TotalSP & vbCrLf & _
    "Total Revenue : " & Format(Me.Revenue, "Currency") & vbCrLf & "Total Cost : " & Format(Me.Cost, "Currency") & vbCrLf & _
    "Total Mark-Up : " & Format(Me.TotMark_Up, "Currency")
    
    
    DoCmd.SendObject , , , "Email Address Here", , , "A New Costing Has Been Raised", strMsg
    End Sub
    That is my code for creating the email, how would I manage to create a hyperlink in this?.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 11-13-2014, 02:41 PM
  2. Hyperlink to a specific Excel Worksheet
    By perikillo in forum Access
    Replies: 3
    Last Post: 11-06-2014, 05:07 PM
  3. Report hyperlink to record in Form
    By Lmartinrn in forum Reports
    Replies: 3
    Last Post: 11-29-2012, 06:46 PM
  4. Replies: 2
    Last Post: 08-02-2011, 07:25 AM
  5. Hyperlink to a specific Field/Cell?
    By tbutters in forum Database Design
    Replies: 8
    Last Post: 06-04-2010, 12:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums