you canceled previous operation -Is everything really irretrievably lost?

Happy YN

Registered User.
Local time
Today, 21:03
Joined
Jan 27, 2002
Messages
425
Help!!
My precious form is not opening, nor can I open its vb code. When I tried compacting & repairing I get the error "you canceled previous operation" and everything freezes
Have I really lost everything or is there any way I can pick up some of the pieces?
 
Create a new blank db and try to import the form into it. If that works delete the bad form from your other db and import the saved copy back in. Other than that you're probably screwed.
 
tried that of course to no avail but how ? why ? does this suddenly happen?
Still mopping up my tears
hours of codework down the drain as latest backup was a while ago
 
Two suggestions...

You could try exporting the form as a text file and them import it into another db.

'Save the form as a text file...
Application.SaveAsText acForm, "YourFormNameHere", "C:\SavedForm_YourForm.txt"

'Import the text file info a form
Application.LoadFromText acForm, "YourFormNameHere", "C:\SavedForm_YourForm.txt"


You could try to decompile the db.

From the Start button, use this in the Run... command

"C:\Program Files\Microsoft Office\Office\msaccess.exe" /decompile "C:\AccessDBs\YourDB.mdb"

After you decompile your db, you need to compile it. Open a module, click the Debug option on the menu bar and select the Compile and Save All Modules option.

Your last step is to Compact your db and you should notice a decrease in size the first time you decompile your db.

HTH
 
Just a wild suggestion, but have you tried getting at your fomr and code through the VBE object browser? May not make any difference but everythings worth a try. I know it is. (cries with empathy).

Have you tried accessing the actual form module code with code? Not sure if this will help but is certainly another option. Might not help but I'm sure it will be educational on the way.
 
thanks ghudson and fornation
I shall certainly try all your ideas but I have to stop now until tomorrow night
By the way Fornation - How do you access code through code?
Thanks again everyone for help and sympathy!
 
Please reply to this so I pick it up tomorrow with answer
 
Happy, sorry for the delay. This code is a bit rough but does the business by printing the module code into the debug window.

Function LinesInModule(strModuleName As String) As Long
Dim mdl As Module

On Error GoTo Error_LinesInModule
' Open module.
DoCmd.OpenModule strModuleName
' Return reference to Module object.
Set mdl = Modules(strModuleName)
' Return number of lines in module.
LinesInModule = mdl.CountOfLines

Debug.Print mdl.Lines(1, LinesInModule)

Exit_LinesInModule:
Exit Function

Error_LinesInModule:
MsgBox Err & ": " & Err.Description
' If function fails, return -1.
LinesInModule = -1

Resume Exit_LinesInModule
End Function
 
Happy YN,

Were you able to retrieve your form and the form's code?
 
Good News!

Thanks Fornation for your code. However it didn't work . I received the error message Module not found since it just does not recognise that form
HOWEVER I was clicking around in desperation in the project explorer and when I right clicked on the formname I recieved an option show code which suddenly showed all the code. It was dead like an ordinary .txt but at least I could copy & paste. The user interface was irretrievable so I set to work combining a backup of over a month ago & using a more recent mde for reference and I think I am more or less recovered but at least the precious code is saved.
Thanks everyone for coming to immediate resue & moral support!
This brings me to a backup issue
Can I make a button which will copy a backup of the mdb and adding something to its name which will make it (date)unique so I don't overwite the previous one?
Thanks everyone immensely
 

Users who are viewing this thread

Back
Top Bottom