473,770 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5700
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.goo gle.com...
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
1525
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 Project using Access XP the report is not working now. So I think I have to create a parameter for this one. But don't know what to do. I know how to create parameter but this one is unbound text box which only needs data from dialog box. ...
1
3013
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 button has an onclick() event for printing these reports. I also have a textbox in the form that shows which reports have been selected.
3
2572
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 string by commas, and output to a single textbox on my report (othertext). Normally...I would go in and clean up the data or assign numbers to the text values, but in this instance that is counter productive. Can anyone help me with code to...
4
2699
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 this as "'Brian' Or 'Dave'" and thus doesnt return the desired results. Anyone have any suggestions?
12
2472
by: MLH | last post by:
Can I somehow set a max length of chars entered into an unbound textbox control?
0
3012
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 subform. My question is how to i pass values from unbound textbox to bound textbox every time when the value change in unbound textbox i need to change the value in the bound textbox. When the form load there is already value in the bound textbox...
3
11277
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
3871
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 it work with an unbound control.
4
3506
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 USD. In report detail section: -2 textboxes bound to CURRENCY and CValue from a query. -Another 2 textboxes (unbound control) -> txtRate and txtUSD CURRENCY CValue Rate Value(USD)
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.