L
Leslie
I have this code on a command button on a form what it did in 2003 was
generate an excel spreadsheet and bring up the e-mail command so this report
could be e-mailed to outside vendor.
Now when runing the code the debug comes up and highlights the send object
line of code (docmd.sendobject) we have just this week upgraded to 2007 and
while I will be upgrading databases on an on-going schedule, this one is
still 2003 format. Please let me know what I can do to get the code to work.
This one is next to be upgraded to 2007, but I want the code working before
I upgrade or at least have an idea of what I need to do. When it runs I get
runtime error 2282. and if I choose the debug choice it highlights the
doCmd.SendObject line of code.
Here's the entire code for this command button:
Private Sub OpnVendorMRVs_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'E-Mail Vendor to update MRV's.
Dim stDocName As String, strsql As String
Dim Origvar As String, Coord As String
Coord = Buyer
Origvar = EMail
stDocName = "Vendor Open Returns"
strsql = "select * from TBL_Vendor where [Vnbr]=Forms!FRM_Vendor.VNBR"
DoCmd.OpenReport stDocName, acViewPreview, strsql
DoCmd.SendObject , AcSendObject, stDocName, acFormatXLS, Origvar, Coord,
"RGA-NCM", "Open MRV's", "Please provide an update on the attached
outstanding MRV's. A response must be provided within 15 days from the date
of this e-mail, the comments section of the spreadsheet is provided for your
updated information. Please complete the comments section and e-mail the
spreadsheet back to me."
Exit_OpnVendorMRVs_Click:
Exit Sub
Err_OpnVendorMRVs_Click:
MsgBox Err.Description
Resume Exit_OpnVendorMRVs_Click
End Sub
Thank you for any assistance.
generate an excel spreadsheet and bring up the e-mail command so this report
could be e-mailed to outside vendor.
Now when runing the code the debug comes up and highlights the send object
line of code (docmd.sendobject) we have just this week upgraded to 2007 and
while I will be upgrading databases on an on-going schedule, this one is
still 2003 format. Please let me know what I can do to get the code to work.
This one is next to be upgraded to 2007, but I want the code working before
I upgrade or at least have an idea of what I need to do. When it runs I get
runtime error 2282. and if I choose the debug choice it highlights the
doCmd.SendObject line of code.
Here's the entire code for this command button:
Private Sub OpnVendorMRVs_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'E-Mail Vendor to update MRV's.
Dim stDocName As String, strsql As String
Dim Origvar As String, Coord As String
Coord = Buyer
Origvar = EMail
stDocName = "Vendor Open Returns"
strsql = "select * from TBL_Vendor where [Vnbr]=Forms!FRM_Vendor.VNBR"
DoCmd.OpenReport stDocName, acViewPreview, strsql
DoCmd.SendObject , AcSendObject, stDocName, acFormatXLS, Origvar, Coord,
"RGA-NCM", "Open MRV's", "Please provide an update on the attached
outstanding MRV's. A response must be provided within 15 days from the date
of this e-mail, the comments section of the spreadsheet is provided for your
updated information. Please complete the comments section and e-mail the
spreadsheet back to me."
Exit_OpnVendorMRVs_Click:
Exit Sub
Err_OpnVendorMRVs_Click:
MsgBox Err.Description
Resume Exit_OpnVendorMRVs_Click
End Sub
Thank you for any assistance.