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

VBA and reports

Status
Not open for further replies.

netscamp

Technical User
Oct 3, 2003
19
0
0
US
I have a text box in a form, whose contents are calculated in a VBA module.

The same form has a button to print a report.

I want the button to fire some code that feeds a text box in the report with a value in a text box in the form.

How to refer to the textboxes in the code ?

Thanks a million!

 
Hi netscamp,

By the sounds of it the form will obviously have to be open when the report is previewed(printed), if this is the case then you can set the value of the textbox in the report.

Set the report's textboxes control source to something like the following:

=[Forms]![frmYourFormName]![txtFormsTextBoxName]

This should do it for you.


Regards,
gkprogrammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top