Report textbox referring to another Report's Textbox (1 Viewer)

J

jbard

Guest
I have what seems to be an easy problem to fix.

Is it possible to reference an object (i.e. Textbox) in a report, that exists in another report?

For example:

Report1 conatins a textbox called "Textbox1" and contains a value of 10.

I want to pull Reports![Report1]![Textbox1] into a textbox in Report2.

I tried typing in a direct reference in Report2's textbox "=Reports![Report1]![Textbox1]" and I received an "#Error" message.

Any suggestions?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:51
Joined
Aug 30, 2003
Messages
36,125
Looks okay, but it would only work if the first report was open when the second report ran. Is it?
 
J

jbard

Guest
Yes. The object appears correctly when both reports are open.
 
J

jbard

Guest
Any other suggestions on how to handle this situation?

Unfortunately, opening both reports simultaneously is not an option.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:51
Joined
Aug 30, 2003
Messages
36,125
Since the value appears correctly when both reports are open, your formula is correct. Your only other option I can see (if you can't open the first report before the second) is to use the record source of the first report to get the value that would have appeared in the textbox. Not knowing the structure, I can't be more specific. A dlookup or something like that. You can't open the first report hidden before the second, and close it in the close event of the second report?
 
J

jbard

Guest
Great suggestion on opening and closing the first report "behind the scenes". I will give that a try.

I am also using the Dsum function to obtain data from the actual recordsource (query1) but wanted to find out if there were any other possibilities.

Thanks for the great advice!
 

Users who are viewing this thread

Top Bottom