Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Corrupted form-module ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas Kroljic - 24 Feb 2005 15:01 GMT
I have an Access 2000 application (MDB) with many forms. Each form as a VBA
module behind it. Over the past year or so, I experience a problem with one
specific form. Every once in awhile, if I make a change to the form or the
VBA code behind the form, when I go to run the application, it can not open
the form I just updated. I've tried exporting all the forms, tables,
queries, modules. to another (new) database but I still receive the same
error. I always have to go back to a previous version of the database to
begin again to make (apply) my updates to the form in question and hope that
I don't receive the same error again.

It's as if the form loses its association to the VBA module or the form and
VBA module become corrupt for some reason. Not sure what it is. I've tried
exporting/importing to a new database; I've tried setting the Has Module
status to No for this particular form and then importing the code.

Any suggestions?

The form in question has grown quite a bit over the last year. It would take
some time to create a totally new form with the same functionality. But if
this is what I have to do, so be it.

I've run JetComp against the entire database and still receive the error.

I'm running Access 2000 version 9.0.6926   SP-3

Thank you,

Thomas J. Kroljic
AndréG - 24 Feb 2005 16:37 GMT
It happened to me too.

I thing it's some corrupt pre-processing (posting) of the VB code.

When I got it it helped exporting the code to a text file.
recompiling the database
check the text file for weird characters eventually loading it in notepad
and resaving it to a new file.
reimport the code

AndreG

> I have an Access 2000 application (MDB) with many forms. Each form as a VBA
> module behind it. Over the past year or so, I experience a problem with one
[quoted text clipped - 24 lines]
>
> Thomas J. Kroljic
Thomas Kroljic - 24 Feb 2005 19:57 GMT
Andre,
   Thanks for your response.

   How did you go about exporting the VB code? Did you go into the VBA
editor and select file/export? What file type did you save it as?

   When you import it back in, what exact steps did you do?

Thanks,
Thomas J. Kroljic

> It happened to me too.
>
[quoted text clipped - 36 lines]
> >
> > Thomas J. Kroljic
AndréG - 25 Feb 2005 08:49 GMT
Thomas,

I would just export it as proposed (.cls)
then delete the code module by using "delete" in the Visual basic editor's
property of your form's code (right mouse button).
set the form has module property to no
compact and save the database or even better create a new database and
reimport all (but this form without code).
then reopen and open a blank VB class module for this form by using the
"View", "code" from the menu bar that will open a new clean and empty module
in the VB editor
Check your exported code (.cls) file carefully using a text editor (notepad)
for any weird or foreign characters.
replace the ASCII code text opening it from a text editor (notepad is fine)
using "copy text" and paste into the opened VB editor form's class module
take care not to enter the "attributes" lines (first few lines of the .cls
file).
I hope this will help
good luck
rgds
Andre

> Andre,
>     Thanks for your response.
[quoted text clipped - 6 lines]
> Thanks,
> Thomas J. Kroljic
Thomas Kroljic - 25 Feb 2005 12:32 GMT
AndreG,
   Thanks for the explanation. I'll give it a try.
thomas j. kroljic

> Thomas,
>
[quoted text clipped - 28 lines]
> > Thanks,
> > Thomas J. Kroljic
margaret bartley - 24 Feb 2005 23:21 GMT
Do you have all the updates for Access 2000?
I vaguely seem to recall that this was a known problem that was fixed with
one of the updates.

> I have an Access 2000 application (MDB) with many forms. Each form as a VBA
> module behind it. Over the past year or so, I experience a problem with one
> specific form. Every once in awhile, if I make a change to the form or the
Thomas Kroljic - 25 Feb 2005 12:34 GMT
Margaret,
   Thanks for responding. Not sure if I have all the updates. I believe I'm
at SP-3. Do you know if
this is the latest or is there another service pak? I'll check the MS
website.

Thanks,
Thomas J. Kroljic

> Do you have all the updates for Access 2000?
> I vaguely seem to recall that this was a known problem that was fixed with
[quoted text clipped - 5 lines]
> one
> > specific form. Every once in awhile, if I make a change to the form or the
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.