Design the button in the Design view of the form set its Visible property to No. Then on the button click just set Visible of the second button to True. Something like.
Code:
Private Sub buttonName_Click()
Me.buttonName2.Visible = True
End Sub
Design the button in the Design view of the form set its Visible property to No. Then on the button click just set Visible of the second button to True. Something like.
Code:
Private Sub buttonName_Click()
Me.buttonName2.Visible = True
End Sub
Normally Repaint method is used when you have changed the caption or layout of the Form controls or the form itself. Since visibility is something different to editing the control by itself; it is not needed here.
Repaint just forces the screen to catch up with appearance changes (not data related). If you have a lot of controls on your form and you're changing a lot of properties that affect looks and feel sometimes Access needs to catch up.
Tend to use repaint mostly when I am doing a lengthy do while ... loop displaying the progress.
Have found that if you do repaint too much it actually slows down your processing of the records considerably, thus I limit it to 50 or 100 itterations to do a repaint.
Tend to use repaint mostly when I am doing a lengthy do while ... loop displaying the progress.
Have found that if you do repaint too much it actually slows down your processing of the records considerably, thus I limit it to 50 or 100 itterations to do a repaint.