E
el zorro
I have a view that is filtered by input from the user:
stLinkCriteria = {user-specified month and year}
stDocName = "TestView"
DoCmd.OpenView stDocName, acViewNormal, acReadOnly
DoCmd.ApplyFilter , stLinkCriteria
THis seems to work, but I also want to help the user export the view to an
Excel file. I have tried this:
DoCmd.OutputTo acOutputTable, stDocName, "Microsoft Excel 5-7(*.xls)"
THis outputs the view as a table, but without the filter (i.e., it shows All
the months, not just those specified in stLinkCriteria. Is there a way to
export the filtered view? Or, more likey, a better way to do the whole
process? Thanks!
stLinkCriteria = {user-specified month and year}
stDocName = "TestView"
DoCmd.OpenView stDocName, acViewNormal, acReadOnly
DoCmd.ApplyFilter , stLinkCriteria
THis seems to work, but I also want to help the user export the view to an
Excel file. I have tried this:
DoCmd.OutputTo acOutputTable, stDocName, "Microsoft Excel 5-7(*.xls)"
THis outputs the view as a table, but without the filter (i.e., it shows All
the months, not just those specified in stLinkCriteria. Is there a way to
export the filtered view? Or, more likey, a better way to do the whole
process? Thanks!