Hello Experts,
I have developed an access database, along with all the vba code, using Access 2000. One of my users recently upgraded to Access 2007 and is now receiving error number 2950 when trying to execute a command button attached to a macro (OutputTo Action) that allows the user to export details to an Excel spreadsheet via an output file type of .xls. My guess is that Access 2007 chokes at the .xls reference given that Excel 2007 now saves files using the new default .xlsx [ugh]. I'm fairly new to database development in general and have no idea how to counter this issue.
The code for the command button used to export details from the customer form:
=========
Private Sub cmdExportCustomerDetails_C
lick()
On Error GoTo Err_cmdExportCustomerDetai
ls_Click
Dim stDocName As String
stDocName = "macCustomerActivity"
DoCmd.RunMacro stDocName
Exit_cmdExportCustomerDeta
ils_Click:
Exit Sub
Err_cmdExportCustomerDetai
ls_Click:
MsgBox Err.Description
Resume Exit_cmdExportCustomerDeta
ils_Click
End Sub
====================
The code for the macro itself:
====================
Action: OutputTo
Object Type: Query
Object Name: queryCustomerActivityRepor
t
Output Format: Microsoft Excel (*.xls) -- Note: tried to change this but don't have that option in MSA-2000
Output File: left blank
Auto Start: Yes
Template File: left blank
==============
Thank you in advance!
Regards, Katie
Start Free Trial