Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Code Stops Working (A2K sr1)

    For no reason that I can see my acces db code has stopped working. I have menu form with buttons and after about 2 pushes I get a pop up saying

    Run time error 2486
    You can't carry out that action at this time.

    Then none of the buttons work (I get the same pop up each time or a longer explanation saying the same thing) and all I can do is close the db and reopen. But soon the same thing happens.

    I've tried going back thru backups but eventually the same thing happens. It seems to stop recognising code. I just can't fathom it and I'd hate to have to set up the whole thing from scatch again.
    Any thoughts?
    Peter

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Code Stops Working (A2K sr1)

    Try setting a breakpoint on the code and step thru it using the F8 key, and you should soon see which piece of code does not work.
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code Stops Working (A2K sr1)

    Thanks patt
    I'd checked that and the offending line where it stopped was perfectly OK on the face of it. I've overcome the problem by rewriting the 2 bits of code that set off the problem and all seems fine now - but I'm intrigued as to what set it off in the forst place. It may happen again.
    Peter

  4. #4
    Lounger
    Join Date
    Jul 2002
    Location
    Hampshire, Illinois, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code Stops Working (A2K sr1)

    Any idea what caused this? I'm having the same problem and the code breaks on a line that is perfectly fine also... docmd.maximize... so I am at a loss. Any help would be appreciated.....

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Code Stops Working (A2K sr1)

    What error do you get?
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code Stops Working (A2K sr1)

    Eileen
    I can't remember exactly, but I think it was one piece of code. So even when I restored a backup it misfired every time I ran that piece of code. I never found out why but I think I scrapped the one piece of suspect code, wrote it again from scratch and everything worked OK
    Good luck
    Peter

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Code Stops Working (A2K sr1)

    I've noticed that Access will occasionally get confused about what is causing an error and stop on an apparently innocuous instruction instead of identifying the real problem. The irritating thing is that when that happens, code that should trigger a syntax error (like having an Exit Function in a Sub routine) may not do so. When I see that kind of behavior, I start carefully checking each routine that is called and pay close attention to the error handling. I've never found an quick and easy way to identify those pesky errors, and it is sometimes easier to just rebuild the code if there isn't too much of it.
    Charlotte

Posting Permissions

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