Please help... I've never used Dlookup before and i'm not quite sure what i'm doing.
I have a form where you enter details for a quotation to give to sales.
You select a salesperson from a combobox and upon pushing a button i want to be able to send the quotation report to that particular salesperson. This is what i've got so far.
Private Sub Command55_Click()
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stSubject As String
Dim stMessage As String
stDocName = "QuotationReport"
stToName = DLookup("", "employeetable", [EmployeeTable].[EmployeeID] = [EquiriesMainTable].[EMPLOYEE ID]) [COLOR=red]I'm not quite sure what goes here?[/COLOR]
stCCName = "ABCD[EMAIL="ABCD@ABCD.com"]@ABCD.com"
stSubject = "Quotation Test"
stMessage = "Attached is a self generated purchasing quotation. This is a test."
DoCmd.SendObject acSendReport, stDocName, acFormatSNP, stToName, stCCName, stSubject, stMessage
End Sub
Thanks
I have a form where you enter details for a quotation to give to sales.
You select a salesperson from a combobox and upon pushing a button i want to be able to send the quotation report to that particular salesperson. This is what i've got so far.
Private Sub Command55_Click()
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stSubject As String
Dim stMessage As String
stDocName = "QuotationReport"
stToName = DLookup("", "employeetable", [EmployeeTable].[EmployeeID] = [EquiriesMainTable].[EMPLOYEE ID]) [COLOR=red]I'm not quite sure what goes here?[/COLOR]
stCCName = "ABCD[EMAIL="ABCD@ABCD.com"]@ABCD.com"
stSubject = "Quotation Test"
stMessage = "Attached is a self generated purchasing quotation. This is a test."
DoCmd.SendObject acSendReport, stDocName, acFormatSNP, stToName, stCCName, stSubject, stMessage
End Sub
Thanks