Changing picture on Toggle Button

Banaticus

Registered User.
Local time
Today, 06:27
Joined
Jan 23, 2006
Messages
153
I'd like a toggle button to show one picture when depressed and one picture when not depressed. But the darn toggle button keeps loading the regular picture, but showing that it's depressed. Even calling the function that changes the picture from Form_OnLoad isnt' changing the picture until you go and do something like click on the button. Here's the function that I use to switch the pictures.
Code:
Private Sub RedBlueToggleFlipper()
    If [BlueDot Toggle].Value = True Then
        [BlueDot Toggle].Picture = "F:\Access\largebeigebluebutton.bmp"
    ElseIf [BlueDot Toggle].Value = False Then
        [BlueDot Toggle].Picture = "F:\Access\largebluebutton.bmp"
    End If
    If [RedDot Toggle].Value = True Then
        [RedDot Toggle].Picture = "F:\Access\largebeigeredbutton.bmp"
    ElseIf [RedDot Toggle].Value = False Then
        [RedDot Toggle].Picture = "F:\Access\largeredbutton.bmp"
    End If
End Sub
Seems simple enough, right? That function is called by: "Form_OnLoad()" But the dots, even though the first person on the form should have both dots showing, are showing as depressed versions of the regular picture and aren't showing the special depressed picture. That same function is also called by: "BeltCheck_Click()" and "BookCheck_Click()" which are two checkboxes that person can click to set whether those values are set or not. I also call that same function with the buttons themselves:
Private Sub BlueDot_Toggle_Click()
Private Sub RedDot_Toggle_Click()
Private Sub BlueDot_Toggle_AfterUpdate()
Private Sub RedDot_Toggle_AfterUpdate()

But the special debressed picture isn't showing, it keeps loading with the regular picture, but depressed.
 
Got it, the correct name is "Form_Load" not "Form_OnLoad".
 

Users who are viewing this thread

Back
Top Bottom