-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCommunicationHistoryAdd
More file actions
28 lines (23 loc) · 1.14 KB
/
Copy pathCommunicationHistoryAdd
File metadata and controls
28 lines (23 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Function CommunicationHistoryAdd(sDocumentName As String)
'============================================================================
' Name : CommunicationHistoryAdd
' Author : Erica L Ingram
' Copyright : 2019, A Quo Co.
' Call command: Call CommunicationHistoryAdd(sDocumentName)
' Description : adds entry to CommunicationHistory table
'============================================================================
Dim dbTranscription As DAO.Database
Dim rstCHAdd As DAO.Recordset
Dim sDocumentHyperlink As String, sDocumentPath As String, sCourtDatesID As String
sCourtDatesID = Forms![NewMainMenu]![ProcessJobSubformNMM].Form![JobNumberField]
sDocumentPath = "T:\In Progress\" & sCourtDatesID & "\" & sCourtDatesID & "-" & sDocumentName & ".docx"
sDocumentHyperlink = sCourtDatesID & "-" & sDocumentName & "#" & sDocumentPath & "#"
Set dbTranscription = CurrentDb
Set rstCHAdd = dbTranscription.OpenRecordset("CommunicationHistory")
rstCHAdd.AddNew
rstCHAdd("FileHyperlink").Value = sDocumentHyperlink
rstCHAdd("DateCreated").Value = Now
rstCHAdd("CourtDatesID").Value = sCourtDatesID
rstCHAdd.Update
rstCHAdd.Close
End Function