Results 1 to 29 of 29

Thread: Help! Form loading as module, project corruption [Resolved (kinda)]

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17

    Help! Form loading as module, project corruption [Resolved (kinda)]

    These forums have been extrememly useful when I run into a jam, so I'm hoping somebody will be able to help me this time. Here's my problem:

    When I try to open my vbp file, only one form loads, and I recieve an error for the other 10 or so "The project file .... contains invalid key <formname> -- Continue Loading Project?"

    I am able to open all of these forms by their respective frm files. All but one (the one I had put the most work in, of course). When I open this one form, it opens as a module instead, and I can only view the form code, not the design. As well, additional code has been added to the top of the form. Ie. The form is completely messed.

    I'm not quite sure what caused all this to happen. One second everything was working great, the next it's all fallen apart! Unfortunately, my backups are no good either as I had just updated them all with my latest (corrupted) version. I have put 4 months into this already, and the thought of having to redo all this work has me wanting to go back to bed with the covers over my head. Please, if anyone has any ideas (what happened? how do I fix it? etc.) I would certainly greatly appreciate them.

    Thanks a lot.

    -=VoiÞ=-
    Last edited by voip; Nov 11th, 2003 at 06:06 PM.

  2. #2
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Not sure, maybe try deleting the form's log file from your project directory. (dont permenantly delete it, as you may need it back there.)

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    voip

    First, Open an empty project and creat a form and a module and a class. Save it and reopen the project to see if it reloads correctly. If not then you need to re-install VB.

    If it does open correctly, create a new project and add the current forms and modules into it to see if you can.

  4. #4
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Would that require such drastic measures to re-installing Visual Basic?!

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Unfortunately I think you may be spending some time in bed. I've seen some discussions of this but I can't find them. (Did you quote the error message exactly?) The best thing that I can suggest is that you open the vbp and other files in some text editor and save what you can.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    It's not my VB installation for sure. All my other projects work still. This has been messed up for about a week or so now, so I have had the oppourtunity to try it on several other computers, all with the same results

  7. #7

  8. #8
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Dont worry about it, i doubt it is the way VB is installed on your comp. It also happens on mine. The usual reason for this though is out of date/missing components. Or User Defined Types not defined etc. Im sure it might work if you delete the error log. Its worth a try

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    Madboy, forgive me, but where would I find this error log?

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    voip,

    Post your project, Maybe we can take a look see and see if there is any hope... or confirm your fears.

  11. #11
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Originally posted by Madboy
    Dont worry about it, i doubt it is the way VB is installed on your comp. It also happens on mine. The usual reason for this though is out of date/missing components. Or User Defined Types not defined etc. Im sure it might work if you delete the error log. Its worth a try
    If voip would copy and paste the text of his vbp file to a post I'm sure that you woud see that it contains part of a normal vbp file and some code from one of his forms or modules.

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    Thanks randem, how do I do that?

  13. #13
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Zip your project, and when posting a reply, look below for attachments. Add your file there

  14. #14
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    voip,

    Zip the project, then when you are about to post a reply there is an attach file area lower on the page. Use that to attact the zip file.

  15. #15

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    Here's the project. As you may notice, I am doing it for school...and it's due in 3 weeks
    Last edited by voip; Nov 11th, 2003 at 09:28 PM.

  16. #16
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    I just tried it. When loading the project it says for all forms, that they have invalid key or something. Never experienced this before.

    I dont know why it doesnt work

  17. #17

  18. #18

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    What happens if you just try to open the form frmCustomerAccount on its own? Does it open as a module or a form?

  19. #19
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Yeah sorry marty. Cant help him i know, but i though i may aswell try. Could be a simple explanation.

  20. #20

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    Originally posted by MartinLiss
    Is anyone reading my posts?

    I'm sorry MartinLiss, I didn't see your post....i will look

  21. #21
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    voip

    You're in luck, (Well, sort of). All you need to do is to create a new project and add all your forms and modules back in. Your VBP file is incomplete. You will also have to add any references and compnents to your project BEFORE you open any form which you have components on (or you will have to delete and re-add the components).

    That is if you used the default component names.

  22. #22

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    but what about the frmCustomerAccount form? It shows up as a module when I open it, and there is only a bit of code for it.......there is no graphical form design there at all!!!

  23. #23

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    hmm...the strange code inserted at the top of the "form turned module" form looks just like the vbp file code.....

  24. #24
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    voip


    I did say "Sort of", You will have to recreate any forms or modules that are corrupted. There is no way around that. Your corrupt form may have a missing modules info so you should double check it to make sure you are not missing that module.


    Backup, Backups and more backup. Use zip files as backup also. you can do this everyday or when you get toa point of satifaction about where you are in a project. Just name them with the current dat of the backup and keep multiple copies for as long as you can.

  25. #25
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Originally posted by voip
    hmm...the strange code inserted at the top of the "form turned module" form looks just like the vbp file code.....
    Originally posted by MartinLiss
    If voip would copy and paste the text of his vbp file to a post I'm sure that you woud see that it contains part of a normal vbp file and some code from one of his forms or modules.

  26. #26

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    thanx martinliss, it was actually your post that prompted me to look at it. It is the opposite of what you said though. It is not my project file that contains extra code, it is one of my form files that has the extra code.....all the stuff that is missing from my project file.

  27. #27

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    YAY!!!!!! I copied the extra code from the corrupted code, added it using notepad to my vbp file, and with a few edits was able to get it to run!!!!!

    Now I only need to get that one form working.....

  28. #28

  29. #29

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    17
    Thanks everybody for all your help.

    I just remembered a copy I have from a week ago, so I can get a lot of my missing form design, etc from that. The rest I will just try piecing together as much as I can.

    Looks like this chick is gonna be busy for the next little while


    Thanks again

    -=VoiÞ=-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width