More Help (ie specifics) re, Passing Value to Report.

  • Thread starter Thread starter floresd
  • Start date Start date
F

floresd

Guest
I am grateful for the answer below, but I'm still having trouble. Any specific info, using the info below, would be greatly appreciated. I'm not completely new to VBA. I just haven't done this before.

Lets say;
I have a form called F.
I have a report called R.
F opens R.
F's module determines a value (X) that must be passed to R.
R has a textbox that must show the value of X the user.

My questions are;

How to I pass X from F to R, both from F's side and R's side.
Once the value is passed, how do I get the value to show up on R (ie what is the syntax to bind a report's control to a numeric value in it's module)?

I know that this should be easy. I'm just out of idea's. This forum is a great place to exchange info and I truly appreciate any responses.

Thanks and Regards,
Dave Flores
 
Now I have a new problem. My variable is getting across, but the timing is off.

If I open the report before declaring the reports control equal to my variable, the control is blank. This makes complete sense.

If I attempt to set the value of the reports control before I open the report, I get an error message stating that I'm referencing something that is not open. This too makes sense.

If I open the report in design mode before declaring the control's value, I get an error message telling me that what I'm trying to do is not available in Design Mode. This makes no sense whatsoever.

Help!

Thanks and Regards,
Dave Flores
 
Simply set the value of the report control in the OnOpen property of the report:

ReportR: OnOpen
Me![TextBox] = Forms!frmF!X

You must open the report before closing the form, otherwise the reference will not be valid. Variables are not available in the Design Mode.
 

Users who are viewing this thread

Back
Top Bottom