Refresh

TheOx2K

Registered User.
Local time
Today, 11:03
Joined
Feb 19, 2002
Messages
28
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
 
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
 
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
 

Users who are viewing this thread

Back
Top Bottom