Here's what I did for the corrupt forms (it turns out there were 4 out oaf
104 that were bad -- I haven't gotten to the modules yet).
-In A2002, I went into the VB Editor side, right-clicked the form code entry
in the project explorer window and selected "Export module ..." This saves
the file as a text file with the extension ".cls".
- In the form design window, I set the "Has Module" property of the form to
"No", saved the form and exited A2002. Now I've got a form with no attached
code.
- Loaded the DB into A2003 (it loaded fine at that point), highlighted the
form name in the database window and clicked on the "code" icon in the tool
bar to take me to a blank code module for the form.
- Opened the ".cls" file in Notepad, erased the header lines and the
"Attribute" lines that appear after each "Private WithEvents" declaration,
and copied the rest into the blank code module.
That fixes it. As I mentioned, I have the code modules yet to go through.
With any luck, they won't be a problem.
Thanks again for your help with this problem.
Here's what I did for the corrupt forms (it turns out there were 4 out oaf
104 that were bad -- I haven't gotten to the modules yet).
-In A2002, I went into the VB Editor side, right-clicked the form code entry
in the project explorer window and selected "Export module ..." This saves
the file as a text file with the extension ".cls".
- In the form design window, I set the "Has Module" property of the form to
"No", saved the form and exited A2002. Now I've got a form with no attached
code.
- Loaded the DB into A2003 (it loaded fine at that point), highlighted the
form name in the database window and clicked on the "code" icon in the tool
bar to take me to a blank code module for the form.
- Opened the ".cls" file in Notepad, erased the header lines and the
"Attribute" lines that appear after each "Private WithEvents" declaration,
and copied the rest into the blank code module.
That fixes it. As I mentioned, I have the code modules yet to go through.
With any luck, they won't be a problem.
Thanks again for your help with this problem.
"Allen Browne" wrote:
> Okay, you have run through those sequences, and you are now able to import
> everything except for 2 forms into a new database, and get them working in
> A2003?
>
> If the forms are simple, you could just recreate them.
>
> If you have an old backup of the database, you may be able to import those
> forms from the backup into the working copy.
>
> Alternatively, you could use A2002 to export the forms to a text file. Open
> the Immediate Window (Ctrl+G), and enter something like this:
> SaveAsText acForm, "Form1", "C:\form1.txt"
> Then in the new A2003 database, you can try to import them:
> LoadFromText acForm, "Form1", "C:\form1.txt"
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "jay" <(E-Mail Removed)> wrote in message
> news:0EF2A67A-E352-46C1-B719-(E-Mail Removed)...
> > Thanks for your help, but it just didn't work. I've worked all day on this
> > problem but so far all I've been able to do it to isolate the problem to
> > two
> > forms (and counting). I can't seem to find anything that marks those forms
> > as
> > any different from all the others, though.
> > Thanks again for your prompt repsonse.
> > Jay
> >
> > "Allen Browne" wrote:
> >
> >> Sounds like the databases are corrupted, and you will need Access 2002 to
> >> uncorrupt them.
> >>
> >> 1. Open the database in A2002. Uncheck the boxes under:
> >> Tools | Options | General | Name AutoCorrect
> >> Explanation of why:
> >> http://members.iinet.net.au/~allenbrowne/bug-03.html
> >>
> >> 2. Compact it: Tools | Database Utilities | Compact.
> >>
> >> 3. Close Access.
> >>
> >> 4. Decompile a copy of the database by entering something like this at
> >> the
> >> command prompt while Access is not running. It is all one line, and
> >> include
> >> the quotes:
> >> "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
> >> "c:\MyPath\MyDatabase.mdb"
> >>
> >> 5. Open A2002, and compact again.
> >>
> >> You should now be able to open it in A2003. If not, use A2002 to get
> >> Access
> >> to rebuild the file. It's the 6 steps for the first symptom in this
> >> article:
> >> Recovering from Corruption
> >> at:
> >> http://members.iinet.net.au/~allenbrowne/ser-47.html
> >> --
> >>
> >> "jay" <(E-Mail Removed)> wrote in message
> >> news:E0DBFBD2-6CBD-4436-B166-(E-Mail Removed)...
> >> > I've got two .mdb databases written in Access 2002. When I load them in
> >> > Access 2003, it warns me about potentially dangerous code, then crashes
> >> > with
> >> > the "have to terminate" panel. One DB has an Access 2002 back-end, the
> >> > other
> >> > has a SQL Server back-end. Running Windows XP SP2. Tried starting a new
> >> > database and using File\External Data\Import to import the 2002
> >> > objects.
> >> > It
> >> > crashes when it loads the 2002 database!
> >> > Please HELP!
>
>
>