Dim as ... statement causes VBA editor and Access to crash

  • Thread starter Thread starter Bob Alston
  • Start date Start date
B

Bob Alston

Access 2002 fails when editing vba module. I try to
enter the statement
Dim showDat as integer
immediately after i enter a space after the word "as" it
fails.
Previously I could enter dim statements as usual.

Figured corrupted vba module. Tried importing objects to
new database. No solution.

Tried copying module code to clipboard, deleting module,
compressing database and recreating module. No
resolution.

Tried putting comma after another dim statement and
adding this dim -
dim oldvar as string, showDat as integer
- same failure.

Tried shutting down Access. Tried rebooting system.
System is Dell Dimension 4400 1.7 gig Pentium 4 with 384
meg memory and lots of disk space.

The info in the debugging info sent to microsoft
references vbe6.

Ideas?

Bob
 
take a backup of your original mdb

method 1.
start the database with the /DECOMPILE SWITCH
(shortcut to access "/DECOMPILE" "pathtomdb")
Then open the database and choose recompile all modules
Close
Open database and choose compact database.
close
Open database and verify nothing is missing.

Worked fine for me once in Access97.
So far nothing is missing and shrunk db to half its size.

method 2.
Have you imported all objects into a new database
except the vba module and then recreating the module with
a copy of the code?
 
Back
Top