Loop Limits Question

Discussion in 'Access General' started by JHB, Mar 21, 2013.

  1. JHB

    JHB Guest

    Hi:

    I am running an application which was set up in Access 2000, under
    Access 2007 AND Access 2010 in compatability mode. While I have had no
    trouble with the Access 2000 version or the Access 2007 version, a
    number of things seem different in Access 2010. Among other things,
    the program does a number of loops (working through a table with
    external querys). This is not an issue in 2000 and hasnt been one so
    far in 2007. HOWEVER in 2010 the system throws up a message that I can
    only loop 19 times and then hangs up!.

    I need some way to get around thins (for example resetting the limit),
    since changing the looping logic would be a massive undertaking. Does
    any one have any idea how to do that either through VBA or through
    setting some option in Access?

    Help please -- we are stuck!

    John Baker
     
    JHB, Mar 21, 2013
    #1
    1. Advertisements

  2. JHB

    Puppet_Sock Guest

    [snip]

    It's pretty hard to guess why that might happen. But round up
    the usual suspects. Step through the code and see what is going
    on when the error occurs. Compare what is happening at that
    point in the different versions, and see if you can figure out
    what the difference is.
    Socks
     
    Puppet_Sock, Mar 21, 2013
    #2
    1. Advertisements

  3. JHB

    JHB Guest

    Thanks for the response.

    I have been doing that, but is very time consuming and difficult
    (different machines in different locations and all), Question is is
    there some built in limit and no way to change it? If there is, I will
    probably have to rewrite this whole section for VBA (I assume it
    doesnt have a limit on loops) and scrap the macro code, but that again
    is something that will take a good bit of time.

    JB
     
    JHB, Mar 21, 2013
    #3
  4. JHB

    Puppet_Sock Guest

    There are plenty of built in limits, but none of them are 19.

    As to different locations: remote desktop can be your friend.
    Socks
     
    Puppet_Sock, Mar 21, 2013
    #4
  5. JHB

    JHB Guest

    Is there somewhere that lists them all and says specifically that they
    apply to macro loops? I have not run into this with any versions other
    than 2010!
     
    JHB, Mar 21, 2013
    #5
  6. What's the actual message? And more to the point what's the actual code? Is
    this in VBA, in a table macro, what? How is the loop limit being specified?

    It's a bit hard to see around corners to what's actually going on!
    --

    John W. Vinson [MVP]
    Microsoft's replacements for these newsgroups:
    http://social.msdn.microsoft.com/Forums/en-US/accessdev/
    http://social.answers.microsoft.com/Forums/en-US/addbuz/
    and see also http://www.utteraccess.com
     
    John W. Vinson, Mar 22, 2013
    #6
  7. JHB

    JHB Guest

    Sorry to make life difficult. The code involved macro internal calls
    including one which was to itself. Thats where the problem was. I have
    recoded it as VBA dowhile loop and now it working fine (except for
    problems with echo off!, which are the subject of a seperate question
    to the multitide). You may not realize it but you have bene a big help
    making me really look at what I had done!

    Thanks
     
    JHB, Mar 23, 2013
    #7
  8. Recursion, n. See: Recursion.

    - The Programmer's Dictionary

    <g>

    Glad you got it working!
    --

    John W. Vinson [MVP]
    Microsoft's replacements for these newsgroups:
    http://social.msdn.microsoft.com/Forums/en-US/accessdev/
    http://social.answers.microsoft.com/Forums/en-US/addbuz/
    and see also http://www.utteraccess.com
     
    John W. Vinson, Mar 24, 2013
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.