Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a report from a query on the fly everytime it is accessed

Status
Not open for further replies.

wasing

MIS
Sep 4, 2001
3
US
Hi -

I am creating a report using a query that may have more or less columns everytime it is accessed based upon information in the table. If I add an account to the table, the query picks it up, but the report doesn't since it is hard coded (in some sense of the word). I was wondering if there was a way I could create the report on the fly (behind the scenes) everytime it is accessed based upon all fields in the query. Any help that can be provided would be excellent! Thank you so much!

Regards,

Wasing
 
I know that the solutions.mdb (sample database included with access) has a report based on a crosstab query where the number of columns changes.

Also, I believe the Dhookom may have an example of this on his website (dhookom, correct me if I am wrong)

Good luck!

Fred
 
Wasing,
More info on your situation might be helpful.
What do you mean by an "account?" (like a customer account, or do you mean a new field?). If account, the report should pick it up if it is in established field; but if new field, then question is how many fields do you anticipate adding? If there are only a small number of new fields, you could design a report for each situation and then call the appropriate report from code based on spec's supplied by the requester - using a form for spec's.
Just some brainstorming with you.
Jeff
 
There are a couple opf example of dynamically creating simple tabular reports in the fora, promarily illustrating the CreateReport and CreateControl functions. At least one of them uses a query as the recordsource to both build and populate the report.


See thread705-481652 for one small example of the technique.


MichaelRed
mlred@verizon.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top