creating form crashes a2k

  • Thread starter Thread starter Mke
  • Start date Start date
M

Mke

Hello,

Just tried to create a new form on an a2k app running on
win xp pro that I've been working on for months and
instead of getting a blank default form I get pieces,
subforms actually, of another form in the app and a
warning that I'm out of memory. OS then asks me if I
want to send an error report to ms and shuts down Access.

If I delete the suspect form from the app I'm back to
normal and can create a new form without error but since
the bad form is complicated I'm reluctant to rebuild it
from scratch. Even my earliest backup has the same
problem so that won't help either.

I've tried compact/repair, importing everything into a
new db, deconstructing the bad form a piece at time,
deleting the module behind the form, pasting everything
from the bad form to a new form--nothing works. Just to
check my sanity I imported the bad form into a new db--
just the bad form--and it crashed the new db also.

Can anyone explain why this is happening and suggest how
I can recover/repair the bad form?

Thanks, Mike
 
Mike, your database is partially corrupt.

You could try SaveAsText. Then open a new (blank) database, and use
LoadFromText to import it.

In terms of prevention, the best thing you can do is to ensure you have the
latest service pack from support.microsoft.com.
 
Hello Allen,

I'm not familiar with those commands. Do you mean to use
this approach to repair the data or the form? If for the
data, I don't think there's any problem there or at least
I don't think there is as I can open the table and see
all of the data from beginning to end.

If you mean to save the form as text can you be more
descriptive because I don't see how to do that.

Thanks, Mike

BTW, I used to live in Dalkeith in the 60's when I was a
kid--my dad helped build the Alcoa Kwinana Alumina
Refinery outside Fremantle.
 
Hi Mike.

These are undocumented commands that you can use to create a copy of the
form (not data) as a text file, and then to import the text file into
another database. If the form has subforms, you would need to do this for
each of the subforms also. It is a technique that is useful for getting
around some corruptions.

The syntax is self-explanatory. To save the form:
SaveAsText acForm, "MyForm", "C:\MyForm.txt"
Then in the new database:
LoadFromText acForm, "MyForm", "C:\MyForm.txt"

BTW, turning off "Name AutoCorrect" may also help prevent corruption (Tools
| Options | General).
 
Hello,

I discovered why I could not create the new form: I had
my default form set to the one that seemed to be causing
the problem and I'm guessing that it was to big or just
had too many objects on it to use for this purpose. I
changed the default to "normal" and was immediately able
to create a new form.

Mike
 
Back
Top