Results 1 to 3 of 3
  1. #1
    Galashiels
    Guest

    Access forms won't close (Access 2000)

    Hi
    I am running W2k and Office 2000 pro
    I have a problem with a large property database that has a main form with subforms the subforms are changed via a tree using the set record source. The main form is always open with the subforms record source changing.
    With two of the subforms when I do a refresh by Docmd.refresh, on the main form, the main form will not close I get a message 'This action will reset the code in break mode' with a Yes or No box.
    Clicking either of these has no effect and the form will not close. The only option is to close Access. There does not appear to be any code running.
    If I use F9 to refresh Access closes with no warning.
    All other forms use the same system and are fine.
    I have tried to run refresh in step mode but still can not see what is causing the error.
    Does anyone have any idea as to what may be causing the error or how to trap the code that access says is running.
    What is the difference between F9 and docmd.refresh ?

    Thanks John

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

    Re: Access forms won't close (Access 2000)

    I doubt that it's doing what you think, and most people who try to use F9 like that are more used to Word or Excel than to Access. Are you positive there's no code running in the subforms? Otherwise, how are you changing their recordsource?

    What are you trying to accomplish with the refresh in the first place that a requery won't do better?
    Charlotte

  3. #3
    Galashiels
    Guest

    Re: Access forms won't close (Access 2000)

    Most users are familiar with F9 I can soon disable the key but it was interesting it was happening.
    The requery action does the same thing, the forms are requreied before closing causing the error.
    I have since found, 2 days of testing and checking, that by removing the property 'Orderby' then this is fine no problems, doesn't matter if its a set property or inserted by code it still causes it to crash.
    Why should 'orderby' cause problems?
    I have assumed that a 'Orderby' on the form would be more efficient than a sort of the record source, is this true?

Posting Permissions

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