Results 1 to 10 of 10

Thread: HHHHEEEEELPPP!!!!!!!!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208

    Angry Unloadable form

    I have a form and I wrote:

    timer1.interval=0
    Unload Me

    the form have a timer in whit a interval of 500


    The form appear to unload BUT in the timer , I put this code:

    msgbox "Hi !"

    ok..
    if I wrote timer1.interval=0
    and unload me,
    WHY THE MESSAGE POP UP WHEN THE FORM IS UNLOADED AND THE TIMER STOPPED !?!?!?

    ( I have nothing in Form_unload )

    --> Did you know and other way to unload the form ???

    It could be a 50 page API but I must UNLOAD THE FORM
    AND STOP THE TIMER !!

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    timer.enabled = false
    "People who think they know everything are a great annoyance to those of us who do."

  3. #3
    Guest
    Use this code to get rid of that msgbox that doesn't go away.

    Code:
    Private Sub Form_Unload(Cancel As Integer)
    Timer1.Interval = 0
    Timer1.Enabled = False
    Unload Me
    Set Form1 = Nothing
    End Sub

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    did you know how to UNLOAD now ?

  5. #5
    Lively Member
    Join Date
    Sep 2000
    Location
    NC, USA
    Posts
    102

    Question ?

    where is the code?

    timer1.interval=0
    Unload Me

    When i tried it, it worked fine for me.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    when the form load,
    timer1.interval=5000

    in the timer ,

    msgbox "Hi!"
    timer1.interval=0
    timer1.enabled=false
    unload me
    Set FRM_Access = Nothing ' frm_access is the form name




    The form appear to unload BUT
    The message appear again and again ( and I dont reload the form )
    and in the vb explorer, earch second, the item FRM_Access comme hightlighted and the the form 1 came hightlighted IMMEDIATELY after ..

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    If I reinstall visual basic , did some bug like the unload who just HIDE will be fixed ??

  8. #8
    Lively Member
    Join Date
    Sep 2000
    Location
    NC, USA
    Posts
    102

    Unhappy Sorry

    Sorry, I don't know what is going on. I tried it with the code just like you said it was and in the same place you said yours was and it appears to work fine for me? Sorry. If you want to post a copy of the files somewhere or email them to me maybe there is something else in the project that you are not seeing that is affecting it. I am really not sure.

    Sorry,
    KillemAll

  9. #9
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722
    I believe the timer runs it's own thread. even if you unload the form, the timer is still running.

    I tried the second part of code (where Timer1.Enabled = False, etc) and that works for me too.

    Actually, the first code snippet worked too. Hmmm....

    r0ach™
    Don't forget to rate the post

  10. #10
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Lightbulb

    Try the code on a new form (Just the code you used here). If you still get that problem, it might be your VB, Else it's something else in FRM_Access

    r0ach™
    Don't forget to rate the post

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