where can I retrieve my where from the report

H

homer

I have an app that has a report that prints a record from a form based on the
where_clause passed in. Now they want to modify it to do some data
manupulation before the data binding happen.

I called out the following in my form:

DoCmd.OpenReport ReportName, acViewPreview, , strTmp

And, I think report_Open is the first event fired on the report side, I want
to retrieve the strTmp value and do the data manupulation there before the
query in the underlying record source taking efftect.

Here are my questions:
I couldn't find the strTmp value when I went into debug view on the
Report_Open, not in tag, no such thing called where_clause, or no OpenArgs
like the one I used from form1 to form2.
Am I in the right event given the goal I want to achieve?
If I replace the strTmp, how do I make that new value into the where
parameter/filter value?

Thanks!
 
R

Rick Brandt

homer said:
I have an app that has a report that prints a record from a form
based on the where_clause passed in. Now they want to modify it to do
some data manupulation before the data binding happen.

I called out the following in my form:

DoCmd.OpenReport ReportName, acViewPreview, , strTmp

And, I think report_Open is the first event fired on the report side,
I want to retrieve the strTmp value and do the data manupulation
there before the query in the underlying record source taking efftect.

Here are my questions:
I couldn't find the strTmp value when I went into debug view on the
Report_Open, not in tag, no such thing called where_clause, or no
OpenArgs like the one I used from form1 to form2.
Am I in the right event given the goal I want to achieve?
If I replace the strTmp, how do I make that new value into the where
parameter/filter value?

Thanks!

Newest version has OpenArgs for reports. Otherwise you should find the
where clause passed in within the Filter property. Not sure if it will be
there yet in the Open event, but you can certainly try that.
 
H

homer

Rick,

Thanks for the reply.
Sorry I forgot to mention that I am still in ac97. Also I have just found
out that in report_open the filter is an empty string. Where is the next
event in the report that I can get to the value but before the data binding
taking place?
 
R

Rick Brandt

homer said:
Rick,

Thanks for the reply.
Sorry I forgot to mention that I am still in ac97. Also I have just
found out that in report_open the filter is an empty string. Where is
the next event in the report that I can get to the value but before
the data binding taking place?

The WHERE clause shows up in the Filter property when you get to the Page
event, but that might be too late for your purposes.
 

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