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

Coding a Label Caption in an Access Report

Status
Not open for further replies.

Cherokee17

Programmer
Jun 8, 2005
2
US
I have a Report that i am working on based upon a certain query. I am trying to gain information from another query by using the DLookup function through VBA coding and assigning the returning information to a label caption. I was able to get the information i wanted ...

Dim x As Variant
x = DLookup("[Harvesting]", "Expenses", "[GrowerID] = 87")

but when i try and take that info and assign it to the label i don't get the caption option...

Me.Label11. ??? = x

All i get in the C's is Column & Controls. Any ideas what i am doing wrong? I have seen a couple threads regarding this topic and other people seem to be able to get the caption option, so i don't have any idea why i can't. Thanks for any help.
 
The intellisence dropdown is nice, and from time to time it does give most of the methods and properties assosiated with the control or object one is working with - but not always - in this case, you know there is a caption property to use, just use it.

Roy-Vidar
 
Thanks, Roy
Now i am just having problems with my caption showing the dollar amount (ex. $100.00). I know it has to do with using the format command, but it has been awhile since i have done this kind of stuff. Also is there any way that i can do this using an unbound text box. I just now realized that i will need the amount to be added together with another number (unbound text box) from the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top