A
Andrew
Hi all
I am REALLY hoping someone will be able to help me with this.
I have a database on which I have been working for a while. It's
stored as an mdb file in Access 2003 format.
There are around 40 forms, each with associated modules, plus about 6
standard modules.
I have a form (called frmFrame) which simply contains a navigation
system based on option buttons in a frame, to allow the users to
navigate to various subforms which then fill the childform control
('ChildForm') which takes up most of frmFrame. The code behind the
frame basically says "me.childform.sourceobject=..." Some of the
subforms themselves have subforms, and employ a similar navigational
technique.
All has been fine until about 20 mins ago. I clicked on a navigation
button in frmFrame, and instead of the subform showing with its data,
it simply showed as an empty child fom object. Clicking on a different
navigation button resulted in "You have referred to an object which is
closed or doesn't exist." This was displayed in a message box, as I
had implemented error handling, which trapped the error. I order to
find out where this error occurred, I went to the VBA window and
turned on "Break on all errors". Then I tried the same thing again,
and was pointed to a line which contained a reference to frmFrame. I
hit the Break button - and it did just that!! Broke everything!
By force of habbit, before looking at the error, I hit the save
button, to be told "The database is not in a format recognised by MS
Access" - or words to that effect - and that therefore frmFrame cannot
be saved.
Being very suspicious by this point, I firstly tried to compile the
DB, which worked apparently successfully, then to Compact and Repair.
Once again, I got the message about the file not being in a
recognisable format. On being asked "Do you want access to attempt to
repair the file?" I made the mistake (it seems) of saying yes. The
file compacted, repaired, and reopened. But now none of the buttons
work. And going to the VBA editor, I find that none of my code exists
any more! Not a line! No class modules, form modules or standard
modules. Closing and re-opening the db (kind of like pinching myself
after a bad dream) did not help......
Can anyone help me? Tell me that it hasn't all been wiped out....
There's no sign of any temp files or anything else that I can try to
get into - at least not in the same folder as the mdb file.
Thankfully, I do have various backups, the last of which would mean
that I've lost all the work done today - I tend to make backups at the
end of each day - so it's not a case that everything's gone, but I
would really like to know what's happened to try to prevent it from
happening again.
I compile the code about every 5 mins max, or whenever I write a new
procedure
I save every time I make any change to code or design.
I eat my greens every day.
Help!
Thank you.
Andrew
I am REALLY hoping someone will be able to help me with this.
I have a database on which I have been working for a while. It's
stored as an mdb file in Access 2003 format.
There are around 40 forms, each with associated modules, plus about 6
standard modules.
I have a form (called frmFrame) which simply contains a navigation
system based on option buttons in a frame, to allow the users to
navigate to various subforms which then fill the childform control
('ChildForm') which takes up most of frmFrame. The code behind the
frame basically says "me.childform.sourceobject=..." Some of the
subforms themselves have subforms, and employ a similar navigational
technique.
All has been fine until about 20 mins ago. I clicked on a navigation
button in frmFrame, and instead of the subform showing with its data,
it simply showed as an empty child fom object. Clicking on a different
navigation button resulted in "You have referred to an object which is
closed or doesn't exist." This was displayed in a message box, as I
had implemented error handling, which trapped the error. I order to
find out where this error occurred, I went to the VBA window and
turned on "Break on all errors". Then I tried the same thing again,
and was pointed to a line which contained a reference to frmFrame. I
hit the Break button - and it did just that!! Broke everything!
By force of habbit, before looking at the error, I hit the save
button, to be told "The database is not in a format recognised by MS
Access" - or words to that effect - and that therefore frmFrame cannot
be saved.
Being very suspicious by this point, I firstly tried to compile the
DB, which worked apparently successfully, then to Compact and Repair.
Once again, I got the message about the file not being in a
recognisable format. On being asked "Do you want access to attempt to
repair the file?" I made the mistake (it seems) of saying yes. The
file compacted, repaired, and reopened. But now none of the buttons
work. And going to the VBA editor, I find that none of my code exists
any more! Not a line! No class modules, form modules or standard
modules. Closing and re-opening the db (kind of like pinching myself
after a bad dream) did not help......
Can anyone help me? Tell me that it hasn't all been wiped out....
There's no sign of any temp files or anything else that I can try to
get into - at least not in the same folder as the mdb file.
Thankfully, I do have various backups, the last of which would mean
that I've lost all the work done today - I tend to make backups at the
end of each day - so it's not a case that everything's gone, but I
would really like to know what's happened to try to prevent it from
happening again.
I compile the code about every 5 mins max, or whenever I write a new
procedure
I save every time I make any change to code or design.
I eat my greens every day.
Help!
Thank you.
Andrew