I am using Access 2007. I have a form 'Personnel' on which I have buttons to print reports. The buttons open up a modular form, i.e. ageinstructios, in which the user fill in some of the parameters fo the report, i.e. date to which to calculate the age, status, and group. On the modular form, I then have a button that opens the report in preview. The query on which the report is based picks up the parameters from the modular form and all works well.
However, I would like the report to pick up the current Filter from the 'Personnel' form. Since I am calling the report from the modular form, when I try:
DoCmd.OpenReport "AgeReport", A_PREVIEW, , Me.Filter
in the 'on click' of the button that opens the report, it does not pick up the filter from my 'personnel' form, but rather, I think, from the modular form from which it is being called.
How can I open the report from the modular form, but have it pick up the Filter from the 'Personnel' form? I am guessing the 'Me.Filter' part of the command has to change. I have tried a number of things, but nothing has worked.
Thanks for any help you can give.
McLigs
However, I would like the report to pick up the current Filter from the 'Personnel' form. Since I am calling the report from the modular form, when I try:
DoCmd.OpenReport "AgeReport", A_PREVIEW, , Me.Filter
in the 'on click' of the button that opens the report, it does not pick up the filter from my 'personnel' form, but rather, I think, from the modular form from which it is being called.
How can I open the report from the modular form, but have it pick up the Filter from the 'Personnel' form? I am guessing the 'Me.Filter' part of the command has to change. I have tried a number of things, but nothing has worked.
Thanks for any help you can give.
McLigs