473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to know how close I am to fixing "Compile error: Procedure too large".

JustJim
407 Expert 256MB
Well howdy, strangers! Long time no see.

I have an Access application that's throwing the "Procedure too large" error. The Sub really* does need to be as complex as it is, but I have been trying to save some bits by minimising remarks and variable name lengths etc, while still trying to maintain some readability.

What I really want to know is how can I tell if I'm getting close to solving the problem? If I paste everything between Sub and End Sub into Notepad as a text file, the size of that file is down to 53.0 KB (reporting as 56.0 KB "on disc"). This seems like it should compile to under the 64 KB limit that Access imposes.

Any ideas as to how I can get Access/VBA to tell me if I'm getting close?

Thanks in advance, and I promise I'll try to return before five years is up this time!

*No, really, it does.
Jul 3 '14 #1

✓ answered by NeoPa

In case it helps, the built-in documenter has various options that you can include - or not - in the results. Also, if you save it as an RTF file you can open it in Word and search for whatever it is you most want to see.

I'm not sure it has anything of that ilk included though, I'm afraid.

4 1197
twinnyfo
3,653 Expert Mod 2GB
JustJim,

All I can recommend is that you try to export some of the code to other subs. I understand large subs, too, as I have some that turned out much larger than I expected. You also may not have code that is readily divisible like that, but sometimes you have to make it fit. I don't think changing the variable lengths will affect anything, as Access allocates resources based on the data type, and not so much the name.

Hope this helps.
Jul 3 '14 #2
NeoPa
32,556 Expert Mod 16PB
Hi Jim.

I'm afraid I'm with Twinnyfo on this one. Comments are not likely to be a factor. Nor are the sizes of variables. This is a compiler problem.

I hear you state categorically that the code in this one individual procedure must all stay together, but frankly I'm utterly at a loss even to imagine how that can possibly take you to 53KB. I have a long and clumsy procedure in my project that I haven't split up as well as I should have and that is barely over 3KB. Maybe some clues as to why so much needs to be together in the same procedure might point is in a direction that we can find some helpful tips for you.

Obviously, the standard way of reducing procedure size is to do as Twinnyfo has already suggested and to encapsulate parts of the logic in procedures that are called once or many times from within your original procedure, but I expect you've already considered that approach and done whatever you can on that score.
Jul 3 '14 #3
JustJim
407 Expert 256MB
Thanks folks,

It seems that I shall have to put some real effort into splitting up this code. It probably can be done, but it's going to be a pain in the sitter-upon.

What I was really after though, was a way to peek under the bonnet/hood of Access and see exactly how large the code in question was once compiled so that I could get an idea of how far I had left to go.

I tried the built-in "Database Documenter" on the form that contains the button that calls the Sub in question, but it either doesn't document that item or I couldn't find it in the myriad pages that even one form generates!

In the meantime, I'll get on with dividing up the code into separate bits.
Jul 8 '14 #4
NeoPa
32,556 Expert Mod 16PB
In case it helps, the built-in documenter has various options that you can include - or not - in the results. Also, if you save it as an RTF file you can open it in Word and search for whatever it is you most want to see.

I'm not sure it has anything of that ilk included though, I'm afraid.
Jul 8 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Varun | last post by:
Hello Despite all the advise i have recieved from everyone on this group i still cannot fix this error. I am fast approachin my deadline so i need to fix this asap :o I get the error whenever i...
1
by: Senthil | last post by:
Hi, I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error, "procedure expects parameter <@firstname>, which was not...
0
by: Eugene Safrankow | last post by:
Hello All! I've encountered with the error when I call a method of dependency library (written in managed VC++) from Smart Client placed on a web page. In general, I make a call to the Windows...
1
by: colleen1980 | last post by:
This program runs fine in my company but when i try to run at home it gives that error: Compiler error: Procedure too large Thank You.
6
by: Marc | last post by:
The below snippet does not work...anyone know how to reference the procedure 'DrawCross()'? Private Sub MarkVORToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As...
1
by: smoi | last post by:
I have two listbox in my Form, one call lstFolders, the other one call lstFiles. I have the functions below: Private Sub lstFolders_DblClick() 'Call FunctionToListFilesInThisFolder End...
2
devikacs
by: devikacs | last post by:
how do i know who accessed/ran a procedure or query
0
by: NotepadZ | last post by:
I am getting a frustrating error when i try to insert into the table the trigger i created is on. Any insight would be appreciated Error: db2 => INSERT INTO trstat VALUES ('340758A', ...
6
by: Ciaroscuro | last post by:
Howdy - In setting up a registration form, I'd like to keep any correct entries on the form (make them sticky). The Registration Form is "included" and has the the following structure: ...
1
by: Donnie Seibel | last post by:
I wrote a script to list all lines in a file with Perl. I am having trouble with the looping part of it. My script is supposed to look at the file and as long as the file is larger than the current...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.