Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

VBA refreshing a control

  • 04-03-2004 01:01PM
    #1
    Moderators, Society & Culture Moderators Posts: 2,687 Mod ✭✭✭✭


    Is it possible to refresh a control in VBA without refreshing the whole form???

    for instance, each time a checkbox is checked, the text in a certain textbox turns green, and when its unchecked, it turns red?

    I know how to do this in the checkboxes click event, but im trying to do it through conditional formatting for the textbox. it works, but you have to change records and come back to see the change, ie it doesnt happen immediately.


Comments

  • Closed Accounts Posts: 333 ✭✭McGintyMcGoo


    In VBA, is it not just "Me.controlname.requery".
    or
    Forms!formnamegoeshere.controlname.requery :confused:


  • Closed Accounts Posts: 8,259 ✭✭✭RicardoSmith


    I'm curious why you'd want to do conditional formatting for the textbox.


  • Moderators, Society & Culture Moderators Posts: 2,687 Mod ✭✭✭✭Morpheus


    My boss didnt want any code in the checkboxes on click event....

    in the end we had to put it there... hes weird but hes the boss :rolleyes:

    In any event it works fine now, see i used conditional formatting in some combo boxes earlier, but they worked ok, i guess its down to the form the combo boxes were on and the form the text box was on and the controls themselves having different types of behaviour!!


  • Closed Accounts Posts: 8,259 ✭✭✭RicardoSmith


    Originally posted by Morphéus
    My boss didnt want any code in the checkboxes on click event....

    in the end we had to put it there... hes weird but hes the boss :rolleyes:

    In any event it works fine now, see i used conditional formatting in some combo boxes earlier, but they worked ok, i guess its down to the form the combo boxes were on and the form the text box was on and the controls themselves having different types of behaviour!!

    I just don't understand why you'd want it.


Advertisement