Results 1 to 4 of 4

Changing a label value in VBA

  1. #1
    George is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2012
    Posts
    275

    Changing a label value in VBA

    Good Day All,



    We know that a value in a textbox can be changed using VBA. However I would like to change the value in a Label based on a condition. This is not working so I would like to know if it is prohibited.

    My code is as follows:
    Code:
    Me.Label246 = "Quotation Request"

  2. #2
    Minty is offline Hacker
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    942
    You need to set the caption property;

    Code:
    Me.Label246.Caption = "Quotation Request"
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    George is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2012
    Posts
    275
    Thanks. Its working fine.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    45,289
    Alternatively, use a textbox with expression in ControlSource to serve as a dynamic 'label'.
    To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 10-10-2017, 02:01 AM
  2. Replies: 3
    Last Post: 10-08-2017, 11:53 AM
  3. Report / Label Format Changing Issue
    By Mike 54 in forum Reports
    Replies: 2
    Last Post: 11-09-2016, 09:10 AM
  4. Changing font color of just part of a label
    By NGFLNG1 in forum Access
    Replies: 3
    Last Post: 09-11-2015, 10:02 AM
  5. Replies: 1
    Last Post: 04-25-2014, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums