|
-
Nov 11th, 2003, 04:44 PM
#1
Thread Starter
Junior Member
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.
-
Nov 11th, 2003, 04:52 PM
#2
Supreme User
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.)
-
Nov 11th, 2003, 04:52 PM
#3
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.
-
Nov 11th, 2003, 04:54 PM
#4
Supreme User
Would that require such drastic measures to re-installing Visual Basic?!
-
Nov 11th, 2003, 04:56 PM
#5
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.
-
Nov 11th, 2003, 04:57 PM
#6
Thread Starter
Junior Member
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
-
Nov 11th, 2003, 04:58 PM
#7
Madboy and randem: I don't think there is much he can do. This happened to me a long time ago and the project files themselves are corrupted.
-
Nov 11th, 2003, 04:59 PM
#8
Supreme User
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
-
Nov 11th, 2003, 05:02 PM
#9
Thread Starter
Junior Member
Madboy, forgive me, but where would I find this error log?
-
Nov 11th, 2003, 05:02 PM
#10
voip,
Post your project, Maybe we can take a look see and see if there is any hope... or confirm your fears.
-
Nov 11th, 2003, 05:06 PM
#11
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.
-
Nov 11th, 2003, 05:06 PM
#12
Thread Starter
Junior Member
Thanks randem, how do I do that?
-
Nov 11th, 2003, 05:07 PM
#13
Supreme User
Zip your project, and when posting a reply, look below for attachments. Add your file there
-
Nov 11th, 2003, 05:08 PM
#14
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.
-
Nov 11th, 2003, 05:13 PM
#15
Thread Starter
Junior Member
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.
-
Nov 11th, 2003, 05:16 PM
#16
Supreme User
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
-
Nov 11th, 2003, 05:19 PM
#17
Is anyone reading my posts?
-
Nov 11th, 2003, 05:20 PM
#18
Thread Starter
Junior Member
What happens if you just try to open the form frmCustomerAccount on its own? Does it open as a module or a form?
-
Nov 11th, 2003, 05:20 PM
#19
Supreme User
Yeah sorry marty. Cant help him i know, but i though i may aswell try. Could be a simple explanation.
-
Nov 11th, 2003, 05:21 PM
#20
Thread Starter
Junior Member
Originally posted by MartinLiss
Is anyone reading my posts?
I'm sorry MartinLiss, I didn't see your post....i will look
-
Nov 11th, 2003, 05:23 PM
#21
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.
-
Nov 11th, 2003, 05:26 PM
#22
Thread Starter
Junior Member
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!!!
-
Nov 11th, 2003, 05:29 PM
#23
Thread Starter
Junior Member
hmm...the strange code inserted at the top of the "form turned module" form looks just like the vbp file code.....
-
Nov 11th, 2003, 05:31 PM
#24
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.
-
Nov 11th, 2003, 05:32 PM
#25
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.
-
Nov 11th, 2003, 05:37 PM
#26
Thread Starter
Junior Member
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.
-
Nov 11th, 2003, 05:39 PM
#27
Thread Starter
Junior Member
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.....
-
Nov 11th, 2003, 05:39 PM
#28
Yes, I forgot which way it was when it happened to me. Basically I think you are sc***ed..
-
Nov 11th, 2003, 06:03 PM
#29
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|