corrupted form? cant open/import

G

Guest

Hello

I have been building a new form and i was adjusting the tab values when i
got an error message when trying to save (sorry i didnt think to screen print
the error). Now i cannot open the form in design/preview mode, nor can i
import it into another db. I have restarted my comp and compacted and repaird
the db numerious times. The vb code is still accessible but when editing it,
the form does not appear in design mode.

any suggestions?

thanks!
 
G

Guest

PJones,

Yes. I have attempted compiling the code and compacting/repairing it and it
still wont open.

a new deveopment: when i run the code: DoCmd.OpenForm "Employee Contact"
i get a runtime error 2001: You canceled the previous operation

does that help any?
 
G

Guest

I hate that error message....

Give this a try. Cut out the code (save it to a text file) and save the
form without a code module. There is a form property called 'has module'
that you can set to false after you remove the code.

Then see if you can open it in design view without the code present. If so
you can paste the code back in, but you'll have to open every coded event so
it is re-associated with the proper control.
 
G

Guest

PJones

I tried what you suggested, but i cant even remove the vb code. when i press
ctrl+x or just try to delete it, it jumps to another form and then the db
(and access) crash and asks me to compact and repair.

is my hope of fixing this wasted? should i just try to rebuild the form?

thanks again for the help!
ben
 
R

RoyVidar

Ben wrote in message
Hello

I have been building a new form and i was adjusting the tab values when i
got an error message when trying to save (sorry i didnt think to screen print
the error). Now i cannot open the form in design/preview mode, nor can i
import it into another db. I have restarted my comp and compacted and repaird
the db numerious times. The vb code is still accessible but when editing it,
the form does not appear in design mode.

any suggestions?

thanks!

Try first the /decompile option - for a step by step description, check
this link
http://www.granite.ab.ca/access/decompile.htm

You should probably get all your objects over to a new database - but
if
the /decompile didn't work, here's a little attempt that might work if
you're lucky. In the immediate pane (ctrl+g) when using a copy of your
original db run this

application.saveastext acform, "frmYourForm", "c:\frmYourForm.txt"

if this works, it should create a textfile with all the form
information. Then load it again - this should - if you're lucky
overwrite the corrupted form.

application.loadfromtext acform, "frmYourForm", "c:\frmYourForm.txt"
 
G

Guest

RoyVidar

i tried your suggestions and the decompile doesnt seem to work.

i was able to create the text file, but i cannot import it it. i get the
error:
run-time error 2285
microsoft office access can't create the output file

this occurs on the line: Application.LoadFromText acForm, "Employee
Contact2", "c:\frmYourForm.txt"

it also create a txt doc called error (with sequential numbers each time it
fails) in the 'my documents' folder on my machine.

any suggestions?
 
R

RoyVidar

Ben wrote in message
RoyVidar

i tried your suggestions and the decompile doesnt seem to work.

i was able to create the text file, but i cannot import it it. i get the
error:
run-time error 2285
microsoft office access can't create the output file

this occurs on the line: Application.LoadFromText acForm, "Employee
Contact2", "c:\frmYourForm.txt"

it also create a txt doc called error (with sequential numbers each time it
fails) in the 'my documents' folder on my machine.

any suggestions?

If you try the loadfromtext in another database, would that work? I
don't know, I think that perhaps can indicate that you are out of luck
with reagards to this method.
 
G

Guest

same error while trying it in a new blank db.

thanks anyways for all the help! ill just try to recreate the form without
corrupting it again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MS Jet cannot find form that's there 1
Imported Form Changes 2
Form Corruption 1
can not open the form sample in design view 1
Come and go errors? 2
form will not open 3
Form Becoming Corrupted 5
Form Open 1

Top