Thanks loads for the help. I can get the delay to work for simple things like the text box, or to delay opening a form with the code you gave me. However, what I wanted it for, I can't get it to work. What I wanted was to make a progress bar. With a short delay, it would make the bar longer. I'd do it in a loop and then exit the loop once it reaches a certain length. I just want some animation to show that it is actually doing something. For some reason, I can't do this. I thought it would be simple once I know how to make a delay. I used this code:
- Private Sub Form_Open(Cancel As Integer)
-
Dim T
-
T = 0
-
Form.AllowDesignChanges = True
-
ProgressBox.Width = T
-
Do
-
Call Sleep(100)
-
T = T + 50
-
ProgressBox.Width = T
-
Loop Until T = 3500
-
End Sub
But it doesn't work. it just does nothing. Any suggestions? I can't insert an animated gif (I'm using access 2000, I can't put in an animated gif). I've searched my big Access 2000 book and there's nothing in there about progress bars.