[RESOLVED but still open for ideas] Ideas to break a huge form into smaller ones
I'm back in VB6 again! :p
I have this HUGE form with hundreads of controls and code. This form is mainly an assembly of 3 loosely related parts that could have been devided into 3 or more smaller forms.
Previous programmer tried to put everything in a single form and it became a debugging nightmare. He didn't follow any standard naming conventions and has used a control array of about 100 textboxes. Each textbox is bound to some data field (from 6 tables). And there isn't a single line of comment to describe them.
I'm looking for an Add-in that can print current line on debug window when you hit F8. (Or any way to print control flow.)
I think that way I'll be able to mark the codes and controls needed by each of the 3 main events. That way it will become easy to separate codes from each other.
Any other tips or ideas ?
Edit: Wow ! 2500 posts. :D
Re: Ideas to break a huge form into smaller ones
I'm facing a similar problem. Previous programmer named his controls txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)... :sick: It's killing me. The hardest part of the job is to rename theme.
So i would be happy to hear of some add-in that can help me a little too :)
Re: Ideas to break a huge form into smaller ones
Quote:
Originally Posted by gavio
txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)... :sick:
EXACTLY same thing happned here. :sick:
...and he added 'Me' keyword before EVERY control without any reason.
Code:
Me.txtFields(39).Text = Me.chkLedger.Value
Re: Ideas to break a huge form into smaller ones
Quote:
Originally Posted by gavio
I'm facing a similar problem. Previous programmer named his controls txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)... :sick: It's killing me. The hardest part of the job is to rename theme.
So i would be happy to hear of some add-in that can help me a little too :)
One thing short of reworking everything might be to set up some public variable to control them. For example if txtFields(0) is last name set up
LastName = 0 and globally change them everywhere to txtFields(LastName).
That might be better then a rewrite.
Re: Ideas to break a huge form into smaller ones
It's not that hard - it's just a pain in the... Specially since you haven't done anything wrong and you must be correcting such other people's stupid work habits. :mad:
Re: Ideas to break a huge form into smaller ones
We have decided to build 3 new forms from scratch. We figured that it will take less time and a lot less headache.
Thanks to everyone for posting. :)