FRX File Corrupted

How can I restore a .FRX file?  I have a frmClass.frm with a frmClass.frx, but the frx is only 1KB when previous versions are larger.  I'm getting a message at runtime that the system is trying to read beyond the end of the frx file.

I can try to restore from a backup, but I've made changes.  I'm not sure about the problems associated with trying to repair, delete, or overlay an FRX file that has been in use.

Any information/tutorial on this would be very much appreciated.

Thanks a bunch.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think, u must be having a new version of the frm file. Simply save the newer version of the frm file which will create a new frx file for it.
The .FRX contains graphics and such. The .FRM has the source code. If you haven't loaded too many graphics and such since the corruption occurred you should be able to replace JUST the .FRX file and your source will be fine.

Use backup .frm + .frx in your project. Delete old code starting from 'Option Explicit' line, and paste new version of code from your corrupted form.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BSmileyAuthor Commented:

Thanks, this is exactly what I needed to do.  Unfortunately my backups and what were in VSS were also corrupted... I don't know how I didn't run into this before.  But I had made a copy of the form using Save As... which worked.  So, by restoring from that copy, and then removing the pieces added to that copy using Notepad, and changing all references to the correct .FRX and class name, I now seem to be OK.

Anything less, such as restoring an old FRX file or deleting the FRX and saving the FRM as suggested elsewhere, caused all my toolbar graphics to disappear and extended properties for the grid controls to disapear.

Glad I was able to restore!  Would have been an awful lot of rework.

I think the problem started when I did the Save As... on the file.  Don't know why it happened, but prior to that I was able to work with and run the form OK.

Thanks again,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.