M
Maverick6197
Does anyone know what is wrong with the following code:
I'm trying to use this to pull an e-mail address from a table based on the
dealer and then e-mail a report to that e-mail using the Win2pdf mail helper
program. Everything seems to work fine except the DLookup....
___________________________________________________________________________
Dim AUTACCode As String
AUTACCode = DLookup("[E-MAIL_CONTACT]", "tblMasterDealerContact", "
[AUTAC_LOOKUP_CODE] = '" & Me![txtAUTACLookup] & "'")
E-MAIL_CONTACT is a field in tblMasterDealerContact
AUTAC_LOOKUP_CODE is a field in tblMasterDealerContact
SaveWin2PDFDword "file options", &H41
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailRecipients",
AUTACCode
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailSubject",
"Warranty Request Denial Notification"
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailNote", "Please see
the attached document concerning a Warranty Request filed with Astec
Underground."
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName", "C:\
Documents and Settings\cau1042\Desktop\rptDeniedClaim.pdf"
DoCmd.OpenReport "rptDeniedClaim", acViewNormal
________________________________________________________________________________
txtAUTACLookup is a control on my form. Its data source is =((Forms!frmClaim!
cmbDealerNumber) & "WM")
Everytime I run the code it gives me the "You cancelled the previous
operation." error.
The 2 fields from my table actually have spaces not underscores, but I've
tried it both ways.
tblMasterDealerContact is a linked Excel file.
Any help would be greatly apprecitated. Thanks again.
Shannan
I'm trying to use this to pull an e-mail address from a table based on the
dealer and then e-mail a report to that e-mail using the Win2pdf mail helper
program. Everything seems to work fine except the DLookup....
___________________________________________________________________________
Dim AUTACCode As String
AUTACCode = DLookup("[E-MAIL_CONTACT]", "tblMasterDealerContact", "
[AUTAC_LOOKUP_CODE] = '" & Me![txtAUTACLookup] & "'")
E-MAIL_CONTACT is a field in tblMasterDealerContact
AUTAC_LOOKUP_CODE is a field in tblMasterDealerContact
SaveWin2PDFDword "file options", &H41
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailRecipients",
AUTACCode
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailSubject",
"Warranty Request Denial Notification"
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFMailNote", "Please see
the attached document concerning a Warranty Request filed with Astec
Underground."
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName", "C:\
Documents and Settings\cau1042\Desktop\rptDeniedClaim.pdf"
DoCmd.OpenReport "rptDeniedClaim", acViewNormal
________________________________________________________________________________
txtAUTACLookup is a control on my form. Its data source is =((Forms!frmClaim!
cmbDealerNumber) & "WM")
Everytime I run the code it gives me the "You cancelled the previous
operation." error.
The 2 fields from my table actually have spaces not underscores, but I've
tried it both ways.
tblMasterDealerContact is a linked Excel file.
Any help would be greatly apprecitated. Thanks again.
Shannan