I want a label on a full screen form to move to random possitions on the form on a timed basis.
I have tried to do it on click to start off with and have got the label top and left values to change but the label moves to the top left corner of the screen and does not move even though the values are.
I have tried the repaint, refresh commands but with no succsess.
This is the code i have got already but it doesnt work.
Private Sub Detail_Click()
DoCmd.Maximize
Dim MyValue
Randomize ' Initialize random-number generator.
MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.
Text5 = MyValue
STC_LABEL.top = MyValue
STC_LABEL.Left = MyValue
RefreshDatabaseWindow
Me.Refresh
End Sub
I have tried to do it on click to start off with and have got the label top and left values to change but the label moves to the top left corner of the screen and does not move even though the values are.
I have tried the repaint, refresh commands but with no succsess.
This is the code i have got already but it doesnt work.
Private Sub Detail_Click()
DoCmd.Maximize
Dim MyValue
Randomize ' Initialize random-number generator.
MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.
Text5 = MyValue
STC_LABEL.top = MyValue
STC_LABEL.Left = MyValue
RefreshDatabaseWindow
Me.Refresh
End Sub