My attempts to use Flash and gifs in Access went nowhere. Anyone have a simple method for making command buttons act like rollovers, i.e. change color on mouse over? If this was UltraDev, I'd be cooking.
You can put an event in the MouseOver section for a button, but you can't change its colour (I don't know why, but Microcoft don't provide a property for that. You can change the colour of the text, though.
A better effect can be created by making the button invisible and putting the caption on a label placed behind it. That way the user appears to be clicking on a word, though they're actually clicking your invisible button. (If you want a picture to click on instead, then use an unbound image box instead of a label).
Using this method, you can change the Special Effect on the label, say from Flat to Sunken. It looks quite good. In order that it doesn't stay that way you'll need another procedure attached to the MouseOver event of the Detail section, resetting all such buttons to Flat (or whatever they were before). Of course, the Special Effect isn't the only thing you can change - you can change colour, font, caption, whatever you like.
Using a label on a form, when you click on it, it will increase in font size, change color, perform an event you determine an .25 seconds later, change back to normal/
The delay in seconds is given by the Pause function.
Hope it works
RGB
NameOfLabel is the name of any label on the current form
Multiple labels can be used by giving each a unique name
Private Sub Region00RadioButton_Click()
Set FieldToBlinkName = Me.NameOfLabel
Call ChangeToBoldRedThenBack
End Sub
Public Function ChangeToBoldRedThenBack()
FieldToBlinkName.FontSize = 8
FieldToBlinkName.ForeColor = 255
Pause (0.25)
FieldToBlinkName.FontSize = 7
FieldToBlinkName.ForeColor = 0
End Function
Public Function Pause(DelayInSeconds As Double) As Double
Dim PauseTime, Start, Finish, TotalTime
PauseTime = DelayInSeconds ' Sets length of Pause.
Start = Timer ' Starts the delay.
Do While Timer < Start + PauseTime
DoEvents ' Let other stuff run while paused.
Loop
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.