Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too Much Code per button

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi All
I have a button with a large amount of code attached. It is giving me an error that there is too much.
I need all this code.
How can I split it up so it will run.

I was tried seperating in half and attaching half of it to verification box 1 and the other to verification box 2.
Then I tried to set values of Ver..boxs to true via a button. My idea was that it would run the code. (I also tried after update etc..)
It does not work. However if I manually set the boxs on or off the code executes perfectly. How can I get the code to excute??

Thanks for the help
S
 
Out of curiosity, how much code does access say is 'too much'?

Try splitting the into a number of functions, these can be called serperately, and with the amount of code there I would assume there are some sections that could be reused in the same/another databse.
 
64 kb it says to me.

Particularly messy code and I can't get it any shorter. Does not matter much though.

I will try what you suggested.
thanks For the reply
s.
 
I'd suggest a good book: "Refactoring - changing the design of existing code", by Martin Fowler.

There is probably a lot of code in the module that can be extracted into subs, functions, other modules or classes. Refactoring is a method of doing that in a controlled way. As the book is largely Java-based, it helps if you can read elementary java. The theory applies to almost any programming language, though.

Best regards
 
Thanks again Don

I already split it up into seperate subs and called them from a command button.
Works Fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top