RE: Get parameter dates in heading

Tech-Archive recommends: Speed Up your PC by fixing your registry



What header are you talking about?

As to your previous question about parameter queries. Parameter queries
have to get data from somewhere so they have a criteria value to include.
There are various ways to pass parameters to queries depending on how you are
using them. One way to do that is to put the value in a control on a form.
Queries can see controls on forms and reports, but they can't see memory
varialbes. If you are getting the dates on the repoert, then you have got
it; however, the real problem here is that exporting a report to Excel is not
very elegant. I no longer do it, because they always look horrible. I do a
lot of reports to Excel but I use Automation so I can control the formatting.
"TKM" wrote:

I think I got it but it thorows it just aboe the title in the first field. I
cant find anywhere where I can put a text box in the header. I can type in
what you told me but eveytime someone runs the report it overwrites the
original one with the info in the header.

"Klatuu" wrote:

Okay, The easiest way to get the dates in the report is to put the dates on
the form that opens the report. As I said earlier, create a text box for
each date in the section of the report you want it to show up in. Put the
reference to the controls you have the dates in in the Control Souce of the
text boxes on the report. It would be like:
Forms!FormName!StartDate

Now, when the report runs, it will look in the text box on the form (the
form has to be open) and put the value in the text box on the report. It
should then export with all the other data on the report.

"TKM" wrote:

They are not in forms just reports. should I change the followoing
Forms!FormName!ControlName and should I put this in the header of the
report? Thanks again

to Reports!ReportName!ControlName?

"Klatuu" wrote:

If the dates are in the report, they should export with the rest of the report.

"TKM" wrote:

Thank you this would work but I have my Access reports exporting to Excel.
When the user clicks the button to export it overwrites the current
spread*** so they would receive the updated data. In this case it is a new
spread*** everytime so the formula would not remain on the ***. Any other
advise would be very helpfull.

"Klatuu" wrote:

The dates need to be available where the report can find them. I am assuming
you have the dates in controls on your form. You can tell the report to find
them there. Whether you are putting them in the Report Header Section or the
Page Header Section, it is the same.

Create a text box for each date and put the reference to the form control in
the Control Source property of the text boxes:
Forms!FormName!ControlName

"TKM" wrote:

I have a report with between dates set as my parameter. How do I get these
dates to show in my report when it gets exported to Excel? I want the two
dates to show at the top of the page in the Heading.
.


Quantcast