Procedure too large error

  • Thread starter Thread starter mjmx1
  • Start date Start date
M

mjmx1

Help... I have a form in access where one of the fields has an afterUpdate
event procedure .... works ok except i need to add more rules to the event
BUT keep getting "Procedure too large" message .... I have tried creating
another procedure in a new module ... but it doesnt recognise the fields from
the original form ..

Hope this makes sense and someone can help .. Many Thanks in anticipation...
 
mjmx1 said:
Help... I have a form in access where one of the fields has an afterUpdate
event procedure .... works ok except i need to add more rules to the event
BUT keep getting "Procedure too large" message


Either you have a lot of really strange code in that
procedure, you have a weird coding error or the module is
corrupted.

Check to make sure you are not missing some End Sub, End If,
etc. statements.

If it's corruption, try decompiling. See
http://allenbrowne.com/ser-47.html
http://allenbrowne.com/ser-25.html

If you just have a ton of code, please provide an example of
the repetitive blocks and maybe we can suggest an
alternative that will use fewer lines.
 
Help... I have a form in access where one of the fields has an afterUpdate
event procedure .... works ok except i need to add more rules to the event
BUT keep getting "Procedure too large" message .... I have tried creating
another procedure in a new module ... but it doesnt recognise the fields from
the original form ..

Hope this makes sense and someone can help .. Many Thanks in anticipation...

SHEESH! How big is this procedure!?! How many lines of code?

I very strongly suspect that you have umpteen lines of IF statements with
hardcoded conditions which should probably be reduced to one loop through a
table of rules, but obviously I can't see your application.

Could you perhaps code the rules into a function in a Module, and call that
function from your form event?
 
Back
Top