Results 1 to 10 of 10
  1. #1
    chamberlaing is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    4

    Adjusting Form Labels when macros are selected

    I am trying to change a label when button is selected. There are 30 buttons and when I return to the main form, the label of the button pushed will have changed to indicate it has been selected. I have the macros to bring up questions and record responses but when I return to main I cant get button to change.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Labels have a Caption property that you can assign a value to via VBA. I am not sure how this information relates to your 'macros', though.

  3. #3
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    but when I return to main I cant get button to change.
    Do you mean change from the main form to another and then return to the main form? Does the main form close while doing the other?
    Or does the main form have a subform where other is done?

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I don't use macros, but it would seem you could change the Backcolor/forecolor(and/or other properties) of a label in an associated button Click with a little vba.

    eg: this sort of thing

    Me.LabelName.Backcolor = vbRed

  5. #5
    chamberlaing is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    4
    Quote Originally Posted by davegri View Post
    Do you mean change from the main form to another and then return to the main form? Does the main form close while doing the other?
    Or does the main form have a subform where other is done?
    I have 30 Buttons on a form with a value label for the question. when I select a button it takes me to a question form and a button for right and wrong for each participant. when score is added up it returns to main menu and I need the value on selected button to disappear or be covered over.

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Do you mean change from the main form to another and then return to the main form? Does the main form close while doing the other?
    Or does the main form have a subform where other is done?
    You answered neither of my questions.

    When you say
    I need the value on selected button to disappear or be covered over.

    Buttons do not have values
    . They do have captions on them. Your original post stated that you wanted labels to change when a button was selected. A label is not usually associated with a button.
    I think there's a terminology problem here.
    Buttons do not have labels.
    Buttons are a different control than labels.
    Labels have captions (the words on them).
    Buttons have captions (the words on them).

    If we can't get the terminology right, we will make little progress communicating.
    Last edited by davegri; 08-20-2016 at 04:56 PM. Reason: spelling

  7. #7
    chamberlaing is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    4
    Quote Originally Posted by davegri View Post
    You answered neither of my questions.

    When you say

    Buttons do not have values
    . They do have captions on them. Your original post stated that you wanted labels to change when a button was selected. A label is not usually associated with a button.
    I think there's a terminology problem here.
    Buttons do not have labels.
    Buttons are a different control than labels.
    Labels have captions (the words on them).
    Buttons have captions (the words on them).

    If we can't get the terminology right, we will make little progress communicating.
    OK I jumped into the pool a little early. I am 70 years old and I am trying to get back into Access. I have starting looking into a game I made years ago and I already see that I am going to have to revamp the entire Form, read up on Visual Basic and get a good book on Access 2016. Thank you for you answer. I will be back when I have a little more information

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    My experience is that books for versions after 2010 are geared towards the newer Microsoft Access Web Applications.

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I agree with ItsMe --books on Access since 2010 are geared to iterations of M$oft's web approaches.
    VBA has not changed much. Access object model hasn't changed in any major way.

    Here is a link to vba programming by Steve Bishop. (70+ tutorials on youtube)

    Good luck.

  10. #10
    chamberlaing is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    4

    Thanks

    Quote Originally Posted by orange View Post
    I agree with ItsMe --books on Access since 2010 are geared to iterations of M$oft's web approaches.
    VBA has not changed much. Access object model hasn't changed in any major way.

    Here is a link to vba programming by Steve Bishop. (70+ tutorials on youtube)

    Good luck.
    Thanks to all. I'll be back

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

Similar Threads

  1. Need Help Adjusting Query Expression
    By jtm013 in forum Queries
    Replies: 5
    Last Post: 05-19-2015, 11:04 AM
  2. Replies: 2
    Last Post: 01-09-2014, 07:24 PM
  3. Adjusting Goals for Time
    By athyeh in forum Access
    Replies: 1
    Last Post: 07-25-2013, 03:53 PM
  4. Adjusting the axis of a graph using VBA
    By Sniper-BoOyA- in forum Programming
    Replies: 0
    Last Post: 08-04-2010, 06:41 AM
  5. Adjusting Form size based on screen resolution
    By stombiztalker in forum Forms
    Replies: 0
    Last Post: 02-17-2009, 07:18 PM

Posting Permissions

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