Results 1 to 3 of 3

Thread: whats wrong with this Access97 Module??

  1. #1

    Thread Starter
    Junior Member Anthrax's Avatar
    Join Date
    Oct 1999
    Location
    Maine, USA
    Posts
    29

    Angry

    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
    <|Anthrax|>

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    I think there is a lot better way to pause time. Try something like this:
    Code:
    Option Explicit
    
    Public Sub Pause(pInterval As Single)
        Dim sngTimer As Single
    
        sngTimer = Timer
        Do While Timer < sngTimer + pInterval
            DoEvents
        Loop
    End Sub

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Access

    Make sure the Visual Basic Data Component is installed in Access. That is if nothing in the Module works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width