Assigning Values to a Control Box

M

Martin

Hi,

Is it possible to assign a value to a text control on a report during the
report_open stage, I know I can assign the value to a label but it doesn't
seem to like me trying to assign a value to a text box control.

I've created unbound forms many time but this is the first time i've tried
an unbound report.

This is so of the code;

Me.txt_propref = type_Tenant.PROPREF
Me.txt_tenant = type_Tenant.NAME
Me.txt_address1 = type_Tenant.ADDRESS
Me.txt_town = type_Tenant.TOWN
Me.txt_district = type_Tenant.DISTRICT
Me.txt_postcode = type_Tenant.TOWN

I can do this in 2007 but i'm having to down grade to 2003 because of
compatibility issues.
 
M

Marshall Barton

Martin said:
Is it possible to assign a value to a text control on a report during the
report_open stage, I know I can assign the value to a label but it doesn't
seem to like me trying to assign a value to a text box control.

I've created unbound forms many time but this is the first time i've tried
an unbound report.

This is so of the code;

Me.txt_propref = type_Tenant.PROPREF
Me.txt_tenant = type_Tenant.NAME
Me.txt_address1 = type_Tenant.ADDRESS
Me.txt_town = type_Tenant.TOWN
Me.txt_district = type_Tenant.DISTRICT
Me.txt_postcode = type_Tenant.TOWN

I can do this in 2007 but i'm having to down grade to 2003 because of
compatibility issues.


You can do that in A2007?? If so, I really have to get up
to speed with the scope of changes.

In A03 and earlier, the Open event is too early to set a
control's Value. Many other properties are OK, but not the
Value property. This does make sense in most cases because
the control can have as many instances as the number of
times its section appears in the printout.

You should put that code in the Format event of the section
containing the text boxes. In your case (where the value
never chabges threoughout the report) the Report Header
section's Format event might allow you to organize you code
more neatly.
 
C

Charles Wang[MSFT]

Hi,
I agree with Marsh on this issue. Could you please let us know if you need
further assistance on this issue?

Look forward to your response.

Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 
Top