New to this forum. I need assistance in the following:
I have Access query transferred to Excel. It executes fine the first time, then after it is as if it just give me the same info.
See below, I know it is simple, but thats the only way I can make sense of it.
Private Sub Command37_Click()
Dim outputFileName As String
outputFileName = "C:\Temp"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Full POB for Date entered", "C:\Temp\POB Template" & ".xlsx", True
MsgBox "Data exported to POB Template.xlsx"
Dim sPath As String
sPath = "C:\Temp\POB Template"
Shell "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE """ & sPath & "", vbNormalFocus
End Sub
I have Access query transferred to Excel. It executes fine the first time, then after it is as if it just give me the same info.
See below, I know it is simple, but thats the only way I can make sense of it.
Private Sub Command37_Click()
Dim outputFileName As String
outputFileName = "C:\Temp"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Full POB for Date entered", "C:\Temp\POB Template" & ".xlsx", True
MsgBox "Data exported to POB Template.xlsx"
Dim sPath As String
sPath = "C:\Temp\POB Template"
Shell "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE """ & sPath & "", vbNormalFocus
End Sub