Create report from filtered recordset on form

G

Guest

I have a form which allows users to filter records based on certain criteria
(via the built-in filter functions).

I would like to have a button which will open a datasheet view of the
filtered recordset so that the user can export it to excel, word, etc.

I can't just use the built-in Datasheet view because there are subforms on
the form which contain data that I would need to have available on the
datasheet. I think what I really need is the ability to save the current
recordset as a query so that I can display the resulting records, but am
unsure as to how to do it.

Can any of you help me out?

Any help would be greatly appreciated!
 
W

Wolfgang Kais

Hi JRB.

JRB said:
I have a form which allows users to filter records based on certain
criteria (via the built-in filter functions).

I would like to have a button which will open a datasheet view of the
filtered recordset so that the user can export it to excel, word, etc.

I can't just use the built-in Datasheet view because there are subforms
on the form which contain data that I would need to have available on
the datasheet. I think what I really need is the ability to save the
current recordset as a query so that I can display the resulting
records, but am unsure as to how to do it.

Try the following:
Create another form that contains all columns that need to be exported.
In the event procedure of the button on the first form, enter this:
DoCmd.OpenForm "OtherForm", acFormDS, , Me.Filter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top