URGENT : need help with endless loop with requery code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John F.

    URGENT : need help with endless loop with requery code

    Hi all,



    I'm searching fulltime for days now, and I don't find the solution, so I'm
    thinking this is more a bug :(



    If i use following code in form&subforms:



    Me.Parent![PeopleBase].Requery



    Then sometimes (after 5, 6 or 20 times) i get an endless loop with 100% cpu
    utilization (in the status bar you can see the note 'Calculating' !)

    Some people put this code into the OnCurrent event and other say that this
    is the cause. I tested the code everywhere (onclick, on change, etc...) and
    still the same err occurs. Did err handling to fetch this loop but nothing.
    I'm 100% sure that this line of code is giving me the loop problems. (Some
    people reported that there was no problem in access97 and that it all
    started with version 2000!)



    If i search the net for this then you will find some 1000 msg reporting this
    problem. I run through the most of them to find some solution, but nothing
    did help yet.



    Please, someone smarter then me, please help me with this, I can see it
    anymore!



    Thnx world.

    ps: For your info, I'm using Access2000 eng on a Win2k eng sp4 platform (all
    patches installed)



  • John F.

    #2
    Re: SOLVED 1/2

    Hi all again,

    ITS A BUG!!!!



    Does someone has got good resolution for this ?

    Thnx in advance




    "John F." <john@clearmymi nd.com> wrote in message
    news:3fc383f8$0 $2871$ba620e4c@ reader1.news.sk ynet.be...[color=blue]
    > Hi all,
    >
    >
    >
    > I'm searching fulltime for days now, and I don't find the solution, so I'm
    > thinking this is more a bug :(
    >
    >
    >
    > If i use following code in form&subforms:
    >
    >
    >
    > Me.Parent![PeopleBase].Requery
    >
    >
    >
    > Then sometimes (after 5, 6 or 20 times) i get an endless loop with 100%[/color]
    cpu[color=blue]
    > utilization (in the status bar you can see the note 'Calculating' !)
    >
    > Some people put this code into the OnCurrent event and other say that this
    > is the cause. I tested the code everywhere (onclick, on change, etc...)[/color]
    and[color=blue]
    > still the same err occurs. Did err handling to fetch this loop but[/color]
    nothing.[color=blue]
    > I'm 100% sure that this line of code is giving me the loop problems. (Some
    > people reported that there was no problem in access97 and that it all
    > started with version 2000!)
    >
    >
    >
    > If i search the net for this then you will find some 1000 msg reporting[/color]
    this[color=blue]
    > problem. I run through the most of them to find some solution, but nothing
    > did help yet.
    >
    >
    >
    > Please, someone smarter then me, please help me with this, I can see it
    > anymore!
    >
    >
    >
    > Thnx world.
    >
    > ps: For your info, I'm using Access2000 eng on a Win2k eng sp4 platform[/color]
    (all[color=blue]
    > patches installed)
    >
    >
    >[/color]


    Comment

    • Michael Hopwood

      #3
      Re: SOLVED 1/2

      The link you provided gave the (perhaps unhelpful) solution of firing this
      code from a diferent event, when you tried using diferent events to fire the
      code did you delete the line of code from the OnCurrent event (just
      checking)?

      If so, perhaps you coud use a global variable and the Timer function to
      produce code that will not refresh if it is within a certain amount of time
      from a previous refresh?

      --
      Michael Hopwood (Phobos)


      "John F." <john@clearmymi nd.com> wrote in message
      news:3fc3cbba$0 $27403$ba620e4c @reader3.news.s kynet.be...[color=blue]
      > Hi all again,
      >
      > ITS A BUG!!!!
      >
      > http://support.microsoft.com/default...b;en-us;288374
      >
      > Does someone has got good resolution for this ?
      >
      > Thnx in advance
      >
      >
      >
      >
      > "John F." <john@clearmymi nd.com> wrote in message
      > news:3fc383f8$0 $2871$ba620e4c@ reader1.news.sk ynet.be...[color=green]
      > > Hi all,
      > >
      > >
      > >
      > > I'm searching fulltime for days now, and I don't find the solution, so[/color][/color]
      I'm[color=blue][color=green]
      > > thinking this is more a bug :(
      > >
      > >
      > >
      > > If i use following code in form&subforms:
      > >
      > >
      > >
      > > Me.Parent![PeopleBase].Requery
      > >
      > >
      > >
      > > Then sometimes (after 5, 6 or 20 times) i get an endless loop with 100%[/color]
      > cpu[color=green]
      > > utilization (in the status bar you can see the note 'Calculating' !)
      > >
      > > Some people put this code into the OnCurrent event and other say that[/color][/color]
      this[color=blue][color=green]
      > > is the cause. I tested the code everywhere (onclick, on change, etc...)[/color]
      > and[color=green]
      > > still the same err occurs. Did err handling to fetch this loop but[/color]
      > nothing.[color=green]
      > > I'm 100% sure that this line of code is giving me the loop problems.[/color][/color]
      (Some[color=blue][color=green]
      > > people reported that there was no problem in access97 and that it all
      > > started with version 2000!)
      > >
      > >
      > >
      > > If i search the net for this then you will find some 1000 msg reporting[/color]
      > this[color=green]
      > > problem. I run through the most of them to find some solution, but[/color][/color]
      nothing[color=blue][color=green]
      > > did help yet.
      > >
      > >
      > >
      > > Please, someone smarter then me, please help me with this, I can see it
      > > anymore!
      > >
      > >
      > >
      > > Thnx world.
      > >
      > > ps: For your info, I'm using Access2000 eng on a Win2k eng sp4 platform[/color]
      > (all[color=green]
      > > patches installed)
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • John F.

        #4
        Re: SOLVED 1/2

        Hi Michael,



        I did delete the code in the OnCurrent event when i was trying it on other
        places. I even place it in a button, to fire it at own will. The weird thing
        is that it I found out that it only happens when there was a previous delete
        function fired on the table that gives a warning like : "The record cannot
        be deleted or changed because table 'xxxx' includes related records.". If
        you do then a Requery on the subforms then its bingo :( 100% cpu loop.



        I'm using Access 2000, but the art stated acc2002, so I think this is a big
        bug for years now.



        I'm trying now to use the OnCurrent to fire some code that will fetch the
        current record Key id and change the subform DataSourceQuery and refresh the
        subform. I don't know about this, but its a shot I can do. If I have some
        code i will post it here.



        I don't want to use the timer function because it has nothing to do with "an
        event1 that triggers event2 that triggers back event1.", because I use
        buttons I only click ones, just for testing. I know, everybody is talking
        about this back trigger, but i'm 100% sure this is not true.



        For me, the Requery function just sucks, and is no good. Just a function to
        stay away from. If it only happens 2 times on 10 then you know what I mean.



        Hoop someone got some replacement code for this.



        Cya all.

        Thnx Michael,

        JF



        "Michael Hopwood" <laughing@spamm ers.co.uk> wrote in message
        news:J6ednepzqY kxU16iRVn-hg@brightview.c om...[color=blue]
        > The link you provided gave the (perhaps unhelpful) solution of firing this
        > code from a diferent event, when you tried using diferent events to fire[/color]
        the[color=blue]
        > code did you delete the line of code from the OnCurrent event (just
        > checking)?
        >
        > If so, perhaps you coud use a global variable and the Timer function to
        > produce code that will not refresh if it is within a certain amount of[/color]
        time[color=blue]
        > from a previous refresh?
        >
        > --
        > Michael Hopwood (Phobos)
        >
        >
        > "John F." <john@clearmymi nd.com> wrote in message
        > news:3fc3cbba$0 $27403$ba620e4c @reader3.news.s kynet.be...[color=green]
        > > Hi all again,
        > >
        > > ITS A BUG!!!!
        > >
        > > http://support.microsoft.com/default...b;en-us;288374
        > >
        > > Does someone has got good resolution for this ?
        > >
        > > Thnx in advance
        > >
        > >
        > >
        > >
        > > "John F." <john@clearmymi nd.com> wrote in message
        > > news:3fc383f8$0 $2871$ba620e4c@ reader1.news.sk ynet.be...[color=darkred]
        > > > Hi all,
        > > >
        > > >
        > > >
        > > > I'm searching fulltime for days now, and I don't find the solution, so[/color][/color]
        > I'm[color=green][color=darkred]
        > > > thinking this is more a bug :(
        > > >
        > > >
        > > >
        > > > If i use following code in form&subforms:
        > > >
        > > >
        > > >
        > > > Me.Parent![PeopleBase].Requery
        > > >
        > > >
        > > >
        > > > Then sometimes (after 5, 6 or 20 times) i get an endless loop with[/color][/color][/color]
        100%[color=blue][color=green]
        > > cpu[color=darkred]
        > > > utilization (in the status bar you can see the note 'Calculating' !)
        > > >
        > > > Some people put this code into the OnCurrent event and other say that[/color][/color]
        > this[color=green][color=darkred]
        > > > is the cause. I tested the code everywhere (onclick, on change,[/color][/color][/color]
        etc...)[color=blue][color=green]
        > > and[color=darkred]
        > > > still the same err occurs. Did err handling to fetch this loop but[/color]
        > > nothing.[color=darkred]
        > > > I'm 100% sure that this line of code is giving me the loop problems.[/color][/color]
        > (Some[color=green][color=darkred]
        > > > people reported that there was no problem in access97 and that it all
        > > > started with version 2000!)
        > > >
        > > >
        > > >
        > > > If i search the net for this then you will find some 1000 msg[/color][/color][/color]
        reporting[color=blue][color=green]
        > > this[color=darkred]
        > > > problem. I run through the most of them to find some solution, but[/color][/color]
        > nothing[color=green][color=darkred]
        > > > did help yet.
        > > >
        > > >
        > > >
        > > > Please, someone smarter then me, please help me with this, I can see[/color][/color][/color]
        it[color=blue][color=green][color=darkred]
        > > > anymore!
        > > >
        > > >
        > > >
        > > > Thnx world.
        > > >
        > > > ps: For your info, I'm using Access2000 eng on a Win2k eng sp4[/color][/color][/color]
        platform[color=blue][color=green]
        > > (all[color=darkred]
        > > > patches installed)
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...