PDA

Click to See Complete Forum and Search --> : whats wrong with this Access97 Module??


Anthrax
May 5th, 2000, 05:45 AM
Its been a while since ive been here... like the new look.

I have a module im trying to use in my access 97 database to create a delay before the macro moves to the next command. (display one form with a introduction image, delay, display switchboard...)

when i run it the pause sub dosn't run, but the module opens up in design view... what did i do wrong?
(btw.. im new to sql)
---------------------------------------------------
Option Explicit
Dim x, y As Integer

Public Sub pause()
'Use this sub to create a pause before continuing
'to the next line of the macro

x = 1
y = 20000
For x = 1 To y
Next x

End Sub
--------------------------------------------------
ive tried multiple variations of this code but cant seam to make it work...(i know it will be something stupid... it always is :}~ ).

thanks

Serge
May 5th, 2000, 11:32 PM
I think there is a lot better way to pause time. Try something like this:

Option Explicit

Public Sub Pause(pInterval As Single)
Dim sngTimer As Single

sngTimer = Timer
Do While Timer < sngTimer + pInterval
DoEvents
Loop
End Sub

Edneeis
May 6th, 2000, 07:18 AM
Make sure the Visual Basic Data Component is installed in Access. That is if nothing in the Module works.