473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Unbound Textbox not printing in Report

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
2 5649
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jaYPee | last post by:
I have an unbound textbox in my report that is bound from the textbox in my Dialog Form using a controlsource using Access 97. However after I ported my database to SQL Server 2000 and use Access...
1
by: ManuelC | last post by:
Hi I have a form that contains a multiselect listbox (simple multiselect) and a command button. The listbox shows a list of all reports (about 20) available for users to print and the command...
3
by: Brooke | last post by:
I am new to access, so please excuse ignorance. Within my table (contacts) I have a text field (other). What I am trying to do is collect all of the text input from the field 'other', separate each...
4
by: BerkshireGuy | last post by:
Hello, I have a query that references abn unbound textbox on a form to get the criteria. The unbound textbox can read 'Brian' or 'Dave'. Or just 'Brian'. However, I think the query is seeing...
12
by: MLH | last post by:
Can I somehow set a max length of chars entered into an unbound textbox control?
0
by: colleen1980 | last post by:
Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the...
3
by: Richard | last post by:
How is the result of query placed in a unbound textbox ? Suppose CriteriaLookups has columns TableName, KeyColumn, KeyValue, DataColumn Foo,x,11,xhat Bar,z,3,xyzzy And
8
by: crazyhouse | last post by:
I want to use temporary information from an unbound textbox, but i cant seem to run any code on an unbound textbox. Is this possible. I have it working with a bound "control" but cant seem to make...
4
by: beemomo | last post by:
This is my second post for the same question, hope this time I did explain more clearly about my problem. I need a report that generate the total value of projects from a few foreign currency to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.