By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,105 Members | 1,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,105 IT Pros & Developers. It's quick & easy.

Unbound Textbox not printing in Report

P: n/a
I have a report which I call to print from a form. For security
reasons I have created a global variable:

Const Company = "This Test Company"

I call that constant whereever I want the company name to show whether
it be a textbox or a label on a form. In this situation I have the
unbound textbox on a report which, through VBA calls the constant and
assigns it to the textbox.

Everything is working great when I preview the report but if I call it
to print directly from a form (acPrint or acNormal) and not preview
it, the company name does not show on the printed copy.

I have tried moving the code that assigns the variable to the textbox
from the onLoad event to the onPage event but that had no effect. I
also tried assigning "Company" to the textbox control source but that
didn't work because that value isn't in a table of course.

Anybody have any ideas?

Much appreciated,

Paul .V.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try the Format event for the section that the textbox is in.

--
Wayne Morgan
MS Access MVP
"Paul .V." <pr*******@shaw.ca> wrote in message
news:41**************************@posting.google.c om...
I have a report which I call to print from a form. For security
reasons I have created a global variable:

Const Company = "This Test Company"

I call that constant whereever I want the company name to show whether
it be a textbox or a label on a form. In this situation I have the
unbound textbox on a report which, through VBA calls the constant and
assigns it to the textbox.

Everything is working great when I preview the report but if I call it
to print directly from a form (acPrint or acNormal) and not preview
it, the company name does not show on the printed copy.

I have tried moving the code that assigns the variable to the textbox
from the onLoad event to the onPage event but that had no effect. I
also tried assigning "Company" to the textbox control source but that
didn't work because that value isn't in a table of course.

Anybody have any ideas?

Much appreciated,

Paul .V.

Nov 13 '05 #2

P: n/a
Yep, that did it. I put the code in the onPrint event of the report
header. I knew there was an onPrint event but I just couldn't find it.

Thanks for the quick answer!!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.