Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Sep 2002
    Location
    Camp Lejeune, North Carolina
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Procedure too large (A2k)

    I'm getting a compile error "Procedure too large". What can I do to get rid of it?

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

    Re: Procedure too large (A2k)

    I've never run into this error in Access, although it used to turn up in VB4 when an individual procedure was over the 64Kb limit. If you can provide more details about the environment you're running in (Windows version, Access or SQL Server, etc.) and the exact situation, perhaps someone else can help.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Procedure too large (A2k)

    If you have a very long procedure or function, try to split it up into several parts. You will have to pass values needed by the parts either as arguments to the procedures or functions, or by setting module-level or global variables.

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Procedure too large (A2k)

    I've never encountered this error in Access. The code limitations for a Visual Basic 6 code module (which would also be applicable to Access 2K) are specified in MSDN documentation. See:

    Visual Basic Code Limitations

    To quote briefly:

    "Each procedure can contain up to 64K of code. If a procedure or module exceeds this limit, Visual Basic generates a compile-time error. If you encounter this error, you can avoid it by breaking extremely large procedures into several smaller procedures, or by moving module-level declarations into another module."

    Recommend follow recommendation to "deconstruct" large procedure into smaller ones.

    HTH

Posting Permissions

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