View Full Version : Refresh


TheOx2K
03-15-2002, 02:43 PM
Hi

I have a form that maximizes on opeon the form i have a graphic and a label. On click of the detail i want the label to move to another part of the screen.

I have tried using the random command and get the label to change the top and the left value but on the first click the label goes to top and lft of both 0 and stays there even thought the values are changing. I have tried the refresh command but with no sucsess. Any surgestions would be greatfull.

TheOx

boblarson
03-15-2002, 10:20 PM
Have you tried using Me.Repaint after changing the values of Left and Top. I've noticed that Refresh doesn't seem to work as well as Repaint for things such as labels.

BL
hth

TheOx2K
03-15-2002, 11:44 PM
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