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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Infro from on report into another withoy subreport

Status
Not open for further replies.

Noah114

Technical User
Mar 31, 2005
59
US
Is there a way to pull information from a text box from one report into another report...maybe a dlookup function or something?

I have a report that uses a text box to calculate percentages, I would like to make a summary report that lists bullet points and pulls one of those percentages from the other reports.
 
Yes, you could use DLookup to get data from another query or table.

Si hoc legere scis, nimis eruditionis habes
 
I'm with CosmoKramer. I would never have something in one report that is "coupled" with something on another report without one report being a subreport on the other.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
If you have textbox2 on report2 and you want to assign value of textbox1 from report1 to this text box, you could use:

Me.textbox2 = [Reports]![report1]![textbox1].Value

Write this on the format event of whatever section textbox2 is located on. However, you should check whether report1 is open before doing so and also make provision for whatever happens if it is not open.

Generally, I would never use such a method. It's safer to make this happen at the Record Source level. e.g. on the record source of report2, create a column with provision for null value:
Report1Box : Nz([Reports]![report1]![textbox1].Value,0)
 
How about:

1: create a 'summary' query on the original recordsource and create the summary report on it

or

2: Calculate the percentage in the first report and hide/display various report sections as needed

?

HTH

[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top