Dynamic Access Report from filtered Form



I need help.

I have succuess fully applied the "how to create a dynamic crosstab
report in access" from instructions off of microsofts web site to my
own report and query.

My problem is this.

I have a form in datasheet view, based off a query. When the form is
open I can hide / unhid columns as needed and apply filter by form.
That all is great. But now I want to beable to send the filtered data
on the datasheet form to the Dynamic Report I created showing only the
filtered records and also only show the columns that I did not have
hidden on my form.

How do I do this?

I have tried inserting into the code from microsoft on the On Open
event of my report to apply the filter from my form, but it does not
seem to work, because my reports record source is the underlying query
from my form, not the form. But can't seem to get the corret syntax
or the right location in microsofts code to apply the filter.

Any help would be greatly appreciated.


Allen Browne

Heidi, you could use the Open event of the report to examine the properties
of the columns of the datasheet, and set the properties of the text boxes on
your report to match.

For example, examine:
to see if it is hidden, and then set the Visible property of the control on
the report.

The ColumnWidth property will give you the width on the datasheet, and you
can set the Width and Left of the text box on the report to match. (BTW,
these values are in twips, where 1440 twips = 1 inch.)



Not sure I am referencing the column correctly. Is the column name
the name of the text box?


Allen Browne

Yes: in the form, the column name will be the name of the text box.

The text box on the reort may have the same name on the report (often does),
but not necessarily.

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