dark11984
03-18-2009, 09:41 PM
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("[Email]", "employeetable", [EmployeeTable].[EmployeeID] = [EquiriesMainTable].[EMPLOYEE ID]) I'm not quite sure what goes here?
stCCName = "ABCD@ABCD.com (ABCD@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("[Email]", "employeetable", [EmployeeTable].[EmployeeID] = [EquiriesMainTable].[EMPLOYEE ID]) I'm not quite sure what goes here?
stCCName = "ABCD@ABCD.com (ABCD@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