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

Access2000: How can I set the CanGrow properties for the label?

Status
Not open for further replies.

JenniferD9

Programmer
Jun 5, 2003
7
US
There's a CanGrow properties for the Text Box... Is there a way to set the CanGrow properties for the LABEL (this is NOT address label) in the report? The report is NOT bound to any table, just simply using the SQL queries and passing in a large String to the label. I can't use the Text Box because I have to SetFocus. The SetFocus is applied in the Form only.

Any advice would be appreciated.

Thanks,

JenniferD :eek:)
 
If you're desperate, you can manually set the Height property of the label in either the Format() or Print() events to expand to full. This has been used to make lines longer vertically to create a "table border" look in a report. I personally try and stay away from any programmatical changes in reports as they are problematic--I try and fix everything I need to/get sums and such via queries and subqueries before generating the report.

In your case, I'd say the easiest solution is to switch the label to a textbox with it's data source set to
Code:
="Your label caption here"
... and set it to CanGrow. Problem solved.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Thanks foolio12 but I don't think by changing the LableBox to the TextBox would help me in this case because I'm using the UNBOUND feature therefore if I use TextBox I'll need to use the SetFocus... and it's not letting me using the SetFocus feature in the REPORT. It only applies in the FORM and not the report.

This would all work IF I had the report BOUNDED to the table and would not having any problems using the TextBox. That would be too easy, right? :) I'm still searching... if any one knows there is a way, please let me know.

Thanks,
Jennifer :eek:)
 
Huh? If you need to set the value, use the .Value property, not the .Text property of a textbox. I never learned how to use the .Text property with textboxes so I never learned to accept its limitations. The .Value property doesn't require you to set the focus on the control before modifying.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
I got it to work! :eek:)
Since I can't directly feed in the global parameter to the unbound field in a REPORT, I created an unbound field on the FORM and pass in the global parameter to the unbound field and have it hidden... THEN when I open the Report (Unbound), I hard-coded the comments field(TextBox) back in the SourceControl properties.

FORM:
txtTempComments.Value=strComments

REPORT: (from properties screen)
Name: txtComments
ControlSource: =forms!frmDesc!txtTempComments


Wow! Bound and Unbound...

Thanks,
Jennifer :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top