473,406 Members | 2,867 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,406 software developers and data experts.

Set Caption Of Label On Report

I have a button on a form that opens a report. I need to set the caption of
several labels on the report equal to the value of a columns in comboboxes on
the form something like:

LabelOnReport.Caption = ComboboxOnForm(2)

Where the boundcolumn of the combobox is 1.

I keep getting an error message no matter what I try. How is this done?

Thanks!

Steve
Nov 12 '05 #1
1 7680
In the report's Report Header event...
If the Combo column wanted is the bound column:

LabelName.Caption = forms!FormName!ComboName

If the column wanted is NOT the bound column:

LabelName.Caption = forms!FormName!ComboName.Column(1)

Combo boxes are Zero based, so column(1) is the 2nd column.
The form must be open when the report is run
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Steve" <ss****@bellsouth.net> wrote in message
news:0P*****************@newsread1.news.atl.earthl ink.net...
I have a button on a form that opens a report. I need to set the caption of several labels on the report equal to the value of a columns in comboboxes on the form something like:

LabelOnReport.Caption = ComboboxOnForm(2)

Where the boundcolumn of the combobox is 1.

I keep getting an error message no matter what I try. How is this done?

Thanks!

Steve

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pavan Arise | last post by:
Hi all.. This may seem simple..but I am stuck here! I have a frame in which I have a label. I was trying to change the caption of that label via code (I mean at runtime & not design time). But...
7
by: Paul T. Rong | last post by:
Hello, Often when I open one form, and (without closing it) open the form in its design view, then all the caption value of the controls in this form remained there in form's design view that is...
2
by: Regnab | last post by:
I've searched through the posting and found what should be the solution to changing the value of a label.... Private Sub Report_Open(Cancel As Integer) Me.lblTest.Caption = "I love Access" End...
2
by: Stone | last post by:
HI I am new to this forum. The problem I am facing is that when I do the coding for the label. The caption option doesnot appear in the drop down menu when I write the label name (e.g :...
4
by: Ryan | last post by:
I've got a little bit of code that runs when you enter data in a datasheet view (which is a subform of the form you are in) if rst!DateReceived >= 30 Then Forms!DisposalRecords.Label90.Caption =...
1
by: fperri | last post by:
I hope that this is the right forum. I'm using VB to create a report in Excel. After the report is generated I put two buttons onto the title sheet. Both are for printing a part of the report. Here...
1
by: jkdudhatra | last post by:
How To Change Report Caption Label Property Of Data Report In Visual Basic 6 ?
7
by: dkohel | last post by:
I have a form that returns 100 items. All of the items have have a different value in their Category field. EXAMPLE: ---------------- A B C How can I change the value of the caption in...
4
by: wassimdaccache | last post by:
Hello everybody, I have a report (invoice) I made module called "number2string"(int double) as string My module takes the number and return to me the number written as string. Example...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.