I guess I am not sure how to do this. I have a form, based on a query, that filters data to one of 7 divisions whe the form opens. On that form, I also have menu bar with the 'Filter by Form' and 'Toggel Filter' buttons. I would like to Export the current dataset, including any additional filter set with the filter by form, to an Excel worksteet. At that point I need to format some columns, delete some columns, rename come columns, so I can't simply use the Analyze with Excel because it does not allow that. I can't seem to figure out how to take the forms current recordset and export it. Basically I am using automation to open excel, and I can get this to work. If I open the records set below...
' Create recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("qryDivision", dbOpenSnapshot)
This gets me the initial recordset for the form but does not include any filtering that may have done.
I tried to set a variable to the forms filter property but that seems to be what the property was the last time the form was closed... not what it is currently filtered to. I can pass the string and set the recordset's filter property but it isn't sending the current filter.... any ideas
Any easier ways to do this??? Thanks in advance!
' Create recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("qryDivision", dbOpenSnapshot)
This gets me the initial recordset for the form but does not include any filtering that may have done.
I tried to set a variable to the forms filter property but that seems to be what the property was the last time the form was closed... not what it is currently filtered to. I can pass the string and set the recordset's filter property but it isn't sending the current filter.... any ideas
Any easier ways to do this??? Thanks in advance!