Hello,
I have a parameter query called 'Rev by AcctCode' that takes it's value from a form field; Forms![SalesAssoc]![e-mail].
I am trying to find a way to run this query, get the parameter value to it, and populate an Excel spreadsheet with the results.
Apparently, there is no direct way to use TransferSpreads heet with a parameter query.
Instead, could I somehow get the results into a QueryDef,...
User Profile
Collapse
-
Export Parameter Query Results to Excel
-
But there are other controls on the form. How can there be any association of the value in Forms![SalesAssoc]![e-mail] to the 'Rev by AcctCode' parameter query? I wouldn't think that when using TransferSpreads heet that when the query is a parameter query, that I can 'assume' the form field that holds the parameter. -
I got this to work:
DoCmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel9, "Rev by AcctCode", "C:\Learning\Zi pExcelFile\Resu lts.xls"
The problem is, "Rev by AcctCode" is an MS Access Query that takes the following parameter value; Forms![SalesAssoc]![e-mail].
I need the parameter to get the correct results into the spreadsheet. How can I do this?
I have...Leave a comment:
-
Export Access Data to Excel, Zip, Send Email
Hello,
I'm a non_VBA coder who has been asked to update the following Function:
*************** ***********
Function EMAILER_REV_BY_ ACCTCODE_MACRO( )
On Error GoTo RA_EMAILER_Err
DoCmd.SetWarnin gs False
DoCmd.SelectObj ect acForm, "SalesAssoc ", False
DoCmd.SendObjec t acQuery, "Rev by AcctCode", "MicrosoftExcel (*.xls)", Forms![SalesAssoc]![e-mail],...
No activity results to display
Show More
Leave a comment: