Moving to Access Forum.
In the meantime can you post the actual code you are using and the sql of the query you are trying to send.
___________________________________________
THIS IS THE CODE I USE TO EXPORT THE SPREADSHEET IN AN EMAIL ATTACHMENT
__________________________________________
- Private Sub Command69_Click()
-
On Error GoTo Command69_Click_Err
-
-
DoCmd.SendObject acQuery, "Apt_Requests", "MicrosoftExcelBiff8(*.xls)", "johndoe@gmail.com", "", "johndoe@gmail.com, johndoe@gmail.com,johndoe@gmail.com", "Appointment Request ", "Contents of the email message are IN here", False, ""
-
-
-
Command69_Click_Exit:
-
Exit Sub
-
-
Command69_Click_Err:
-
MsgBox Error$
-
Resume Command69_Click_Exit
-
-
End Sub
__________________________________________________ ______
THIS IS THE CODE I USE TO IMPORT THE SPREADSHEET BACK IN TO A TABLE
__________________________________________________-
- Private Sub Command88_Click()
-
DoCmd.SetWarnings False
-
-
Dim SQL As String
-
-
SQL = "delete * from [pickup] WHERE ((([pickup].DC) Is Null)) "
-
-
DoCmd.RunSQL SQL
-
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "pickup", "U:\REPLIED_CARRIER_APT\Apt_Requests.xls", True, ""
My question, is there a way instead of listing the query name "Apt_requests" in the docmd.sendobject statement to actually write the query sql statement in that docmd.sendobject procedure?
Help so much appreciated.
Thank you!