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?
amebaConnect With a Mentor Commented:
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.
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.

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,
All Courses

From novice to tech pro — start learning today.