Normal Topic [Solved] "Hidden" programming? (Read 555 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
[Solved] "Hidden" programming?
Oct 13th, 2007 at 5:31pm
Print Post Print Post  
Solution: Compile errors that appear when opening a Form that has subforms may actually be in the code behind one of the subforms.

I am using 2.03, application with about 15 databases, most were merged from Q&A databases, have hundreds of reports, specs, etc.

I keep getting error message in Preview Mode, and in normal mode, for one form.  Error message says compile did not complete....... This happens when opening form in Add mode, in Search mode.  When I open program Editor, test passes, but I went and commented out all programming.  I also commented out Application programming.  Many of the other forms open with no problem.

Then I remembered about an earlier import XML problem that was based on programming in Mass Update.  So, I looked at Mass Update Specs, found about 10, deleted about six, kept the other four and commented all of their programming.  No change, still getting same error.  Many elements referred to in the Update Specs referred to elements that were removed after merge process.

I am now looking at the possibility that perhaps programming in Saved Retrieve Specs and/or Reports might be causing this error?  How to easily troubleshoot this?  I am thinking of copying the database, then deleting all reports and all Retrieve Specs to see if that removes the problem.  That would provide a proof of concept that the problem is somewhere in there. 

And if that does remove the problem, that means I will need to open each single Retrieve Spec and/or Report and look for any programming that may be in conflict. I am sure that there are probably some Retrieve Specs and Report elements that are referencing elements that have been removed.  Note, the original fields still exist in the database, but not bound to form elements, to be removed in the future, but not until sure they are not needed.

I spent all last weekend on lost time because I did not remember some command (already forgot what it was).  Decided to ask for help before I lose another weekend, taking the long route vs. a shortcut.  (Aha, just remembered what I forgot, an array list of all reports could have been used).

Cannot even test the form in Preview mode right now.
So, any ideas on a simple way to isolate and correct this error message?
« Last Edit: Oct 14th, 2007 at 1:04pm by Hammer »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: "Hidden" programming?
Reply #1 - Oct 13th, 2007 at 6:15pm
Print Post Print Post  
Saved specs, reports, etc. do not compile when you open the form. The problem must be in the form programming itself or one of the subforms. I'm not clear on what you are saying. Are you saying that a particular from passes Test in Designer, but throws a compile error when opened in Preview?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: "Hidden" programming?
Reply #2 - Oct 13th, 2007 at 9:15pm
Print Post Print Post  
That's what happens.

Aaargh!   I did not consider the subforms.  I had attached subforms but was working top down.  I will do each of the subforms pgm tests as standalones before linking them to parent. 

I am also looking at subforms, maybe 7 levels deep ... any special concerns I should have?  Putting level 7 subform on level 6 form.  Then putting level 6 subform (contains level7 subform) on level 5 form.  And so on. 

Right now when I test parent form (Level 1), programming passes test, but getting compile error.  Comment out all code on parent form and still get error.

This is good news that lower level subforms may be the problem.  Will be much easier than going through Retrieve Specs and Reports.  Glad I asked, and loved the answer.  I sure hope that's it.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: "Hidden" programming?
Reply #3 - Oct 14th, 2007 at 6:36am
Print Post Print Post  
That was it Erika.  Thanks again for the help, you saved the weekend.

Lessons learned:
1.  Ask for help  before committing too much time.
2.  When using sub forms, debug the programming as stand alone before attaching to parent form.
3.  When using nested sub forms, start the debugging at the lowest level first and proceed upwards.
4.  Support from Lantica is fantastic!. (Not really learned today, I have known that for years, but couldn't resist the opportunity for the plug).
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged