Computing.Net > Forums > Programming > Variable Report label in Access VBA

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Variable Report label in Access VBA

Reply to Message Icon

Name: valentino
Date: April 10, 2003 at 05:31:15 Pacific
OS: win2000
CPU/Ram: pentium III
Comment:

Hello to All,

I have a question about approaching a variable Report label-field in Access VBA.

What i want is to fill a Report Label in the Report-details section (not bound to any Table-field!) with a description depending on the value of another (Table-)Field in the report. I cant find a way to approach and change the value from VBA-code in a form or module.

Who can give me a clue? Thanks in advance,

Valentino



Sponsored Link
Ads by Google

Response Number 1
Name: software786
Date: April 14, 2003 at 18:20:40 Pacific
Reply:

For the unbound field, in the report's "Open" event (or wherever you are running your VBA code for that report) try using:

Me.FieldName.Text = "My Value"
or
Me.FieldName.Value = "My Value"

Otherwise, change that field to a Label and use:

Me.FieldName.Caption = "My Value"

The reason I have given you three choices is because I have used all three in various combinations. Some work under certain conditions, some don't.


0
Reply to Message Icon

Related Posts

See More


How to use tapi Delphi Programming



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Variable Report label in Access VBA

Access VBA CheckBox Control www.computing.net/answers/programming/access-vba-checkbox-control/19289.html

Filters In Access www.computing.net/answers/programming/filters-in-access/2771.html

VB in Access 2000 www.computing.net/answers/programming/vb-in-access-2000/6005.html