I have a DB that I use a form filter in and would like to save the filter so the data can be exported. I originally used the export in the filter tool bar but the problem there is if columns are hidden they do not export and I need this user proof so the data can be changed and imported from excel.
Currently, I have this currently set up like:
DoCmd.Close acForm, "Stand by Message"
SendKeys "Task Detail Filter Export", False
SendKeys "{Enter}", False
DoCmd.RunCommand acCmdSaveAsQuery
DoCmd.Minimize
DoCmd.OutputTo acQuery, "Task Detail Filter Export 2", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0
DoCmd.OpenForm "Task Detail Filter", acNormal, "", "", , acNormal
DoCmd.RunCommand acCmdFilterByForm
DoCmd.DeleteObject acQuery, "Task Detail Filter Export"
But using the send keys does not always work as smooth as I would like.
Is there a way I can eliminate the send Keys and automatically assign the Query name in the DoCmd.RunCommand acCmdSaveAsQuery Line?
Currently, I have this currently set up like:
DoCmd.Close acForm, "Stand by Message"
SendKeys "Task Detail Filter Export", False
SendKeys "{Enter}", False
DoCmd.RunCommand acCmdSaveAsQuery
DoCmd.Minimize
DoCmd.OutputTo acQuery, "Task Detail Filter Export 2", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0
DoCmd.OpenForm "Task Detail Filter", acNormal, "", "", , acNormal
DoCmd.RunCommand acCmdFilterByForm
DoCmd.DeleteObject acQuery, "Task Detail Filter Export"
But using the send keys does not always work as smooth as I would like.
Is there a way I can eliminate the send Keys and automatically assign the Query name in the DoCmd.RunCommand acCmdSaveAsQuery Line?