Hello,
I have been on several forums, but haven't quite yet managed to crack this one. I think I am also getting tied up because of the Navigation Form.
What I am trying to do is export the data contained in an unbound subform that displays data based on parameters that a user has entered on the main form. I have no issues getting the data to display in the subform, but I am unable to get the code right to export that data to Excel.
The forms I am using are:
When I click the command button, I get:
Run-time error '438':
Object doesn't support this property or method
I think I am close, but cannot get it across the line.
Any help would be greatly appreciated.
I have been on several forums, but haven't quite yet managed to crack this one. I think I am also getting tied up because of the Navigation Form.
What I am trying to do is export the data contained in an unbound subform that displays data based on parameters that a user has entered on the main form. I have no issues getting the data to display in the subform, but I am unable to get the code right to export that data to Excel.
The forms I am using are:
- Navigation Form
- ExpenseSearchForm (Main Form)
- ExpenseSearchSubform (Subform)
Code:
DoCmd.OutputTo acOutputForm, Forms![Navigation Form]!NavigationSubform.Forms!ExpenseSearchSubform, acFormatXLS, "C:\Expenses.xls", True
When I click the command button, I get:
Run-time error '438':
Object doesn't support this property or method
I think I am close, but cannot get it across the line.
Any help would be greatly appreciated.