Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corrupt database? 2

Status
Not open for further replies.

mp3455

Technical User
Jul 18, 2008
8
US
I accidentally spilled stupid all over my Access project.

At some point, I inadvertently copied the main form of my database under a different name. Once I realized this, I deleted the duplicate form and kept working on the original.

Now I'm getting "Module Not Found" notices in numerous odd places that once worked perfectly, and checking things over in Visual Basic frequently yields numerous pop-up message that read "The form name 'Form_Name' is misspelled or refers to a form that doesn't exist," which is true.

I've checked the dependencies of all my queries, etc. and scoured all my visual basic, and I can find no references to this missing form. Is there anywhere I should be looking, or am I out of luck?
 
Access has a known bug thawt's kind of like this.

If you copy (or import) any code, or a form with VBA code behind it, and don't complile the VB Project, it'll cripple your database.

The error I seem to remeber seeing when I forgot to do this was was "Invalid Network Drive or I/O Problem".

What happens when you compile ?

As a last resort, you may have to create a new DB, import all the objects from the old DB, and (of course) complile it right away.

Tyrone Lumley
SoCalAccessPro
 
When I try to compile, I get the same misspelled/missing form error message 7 or 8 times, and then it fails.
 
SoCal, it does not highlight code while compiling, but it does in other cases. When it does, it highlights the first row of this:

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
modCancel = True
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
If modCancel = True Then
MsgBox "You cannot use the mousewheel to scroll through records. Use PageUp and PageDown.", vbOKOnly + vbInformation
Cancel = True
modCancel = False
End If
End Sub

I picked this up in the forums here and I'm using it on the main form and several subforms to disable mousewheel scrolling. The thing is, it works for the main form, but when used in the subforms, I get a "Module Not Found" message, and then the VB Debugger pops up. Upon exiting the debugger, I get the "misspelled/nonexistent form" message again. This code worked Friday in all instances, but since creating the copied form, it does not.
 
After lot of repetitive clicking and a little bit of cursing I seem to have gotten things back on track by importing all the objects into a new .mdb . Thanks to everyone for their help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top