469,568 Members | 1,378 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Export Filtered Form to Excel

Ken
I have a form that has a command button on it to open a report. The
report is based on the forms data, if it's filtered the report is
filtered, if the form is showing 100 records the report is showing the
same 100 records, etc.

I want to create another command button which exports to excel, in the
same manner above. Whether the form is filtered or not, the same
records should be exported.

I played around with TransferSpreadsheet but I can only get it to
export all the records to excel, even when it's filtered.

Any help would be appreciated.

Thanks,
Ken

Jan 5 '06 #1
1 4881
I use: DoCmd.OutputTo acOutputForm, frmNameOfForm, , , True

This code will put just the records from the record source of your
form. Play around with the acOutputForm method a little and you might
be able to get it to work exactly the way you want it to. Hope this
helps.

Jan 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by richi | last post: by
5 posts views Thread by Simon | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.