M
MARK
I may have asked this question to the wrong group and if so, please
direct me to the correct place.
I have a query named "sumquery" on a single table named
FDNS_Production. The query looks for date parameters using the Between
function. I want to use the macro below to offer push button access to
the query and have the results automatically open in Excel. I
continuously get an error on the TableName part of the DoCmd below.
I'm not a VBA expert by any stretch. I have only the basics and enough
to get myself in trouble. Can someone help me understand why I keep
getting hung up on this. Is there a better way to do what I'm trying?
All help is appreciated as I learn.
Private Sub MonthlyReport_Click()
On Error GoTo Err_MonthlyReport_Click
Dim stDocName As String
stDocName = "sumquery"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
FDNS_PRODUCTION, MonthlyReport, True, "A1:AN12"
Exit_MonthlyReport_Click:
Exit Sub
Err_MonthlyReport_Click:
MsgBox Err.Description
Resume Exit_MonthlyReport_Click
End Sub
direct me to the correct place.
I have a query named "sumquery" on a single table named
FDNS_Production. The query looks for date parameters using the Between
function. I want to use the macro below to offer push button access to
the query and have the results automatically open in Excel. I
continuously get an error on the TableName part of the DoCmd below.
I'm not a VBA expert by any stretch. I have only the basics and enough
to get myself in trouble. Can someone help me understand why I keep
getting hung up on this. Is there a better way to do what I'm trying?
All help is appreciated as I learn.
Private Sub MonthlyReport_Click()
On Error GoTo Err_MonthlyReport_Click
Dim stDocName As String
stDocName = "sumquery"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
FDNS_PRODUCTION, MonthlyReport, True, "A1:AN12"
Exit_MonthlyReport_Click:
Exit Sub
Err_MonthlyReport_Click:
MsgBox Err.Description
Resume Exit_MonthlyReport_Click
End Sub