Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 3rd, 2006, 03:02 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Report change in Design View

Hi Everyone,

I am having a friday brain cramp.

I need to change the caption of a lable on a report at run time. I have done this in the past, I just don't remember how or where.

From vba, I have opened the report in design view, now I just need to reference "lblHeading" and change the caption.

Does anyone have a clue as to how to make that change?

Thanks

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
Reply With Quote
  #2 (permalink)  
Old March 3rd, 2006, 03:28 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do you want to put in the label? You can add code to change the label, or you can use a text box instead and then push the value from your code. That would be easier than using the label, and you can format the text box to look the same way.

HTH


mmcdonal
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2006, 03:36 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi Mike,

I am just putting a header on the report - In this case 'February 2006' but I want it to be dynamic, based on user input. I did this earlier in the week, and then is a state of mind not unlike where I am currently, I saved the old version of the file over the changes that I had made - Grrrrrr!

What code would you use to change the label? And would you put this on the form or the report?

Thanks

Mike
EchoVue.com
Reply With Quote
  #4 (permalink)  
Old March 3rd, 2006, 03:51 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I have done this in forms and reports and used calcualations, field values etc like this:

Me.txtMyTextBox = Date

For Example

Or Me.txtMyTextBox = Me.Field + Me.Field1

etc.

I also use text boxes on headers where I know the user is opening the report using parameters. Then I will just put the field name in the text box on the header and format it like th rest of the banner label like

Label[User Report for] TextBox[UserName]

HTH


mmcdonal
Reply With Quote
  #5 (permalink)  
Old March 3rd, 2006, 04:31 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Thanks!! I got it working. I think that while I am ahead, now may be the right time to call it a day!

Mike

Mike
EchoVue.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot view the design of the .aspx page sansircar ASP.NET 1.0 and 1.1 Professional 1 October 24th, 2006 01:31 PM
Blank Design View ??? smuger Dreamweaver (all versions) 4 October 11th, 2004 04:40 PM
how to enable the design view yylee Access VBA 2 October 4th, 2004 02:23 PM
Question about form's design view reindeerw Access 15 April 12th, 2004 11:33 PM
Could not open in design view!! texasraven ASP.NET 1.x and 2.0 Application Design 4 March 17th, 2004 03:22 PM



All times are GMT -4. The time now is 08:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.