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!

Module without a form that's interfering with other forms. 2

Status
Not open for further replies.

aexley

Technical User
Jul 9, 2001
147
GB
For some reason, I have a module called Form_Form1 with only one member 'btnEDIT_CLICK'. I don't know where it came from but it's becoming a real pain as alterations of other forms results in the message 'The form name FORM1 is mispelled or doesn't exist.' coming up several times and resulting in me not being able to save any changes.

Trouble is I don't know how to delete the module as it doesn't show up in the database window, analyze doesn't pick it up and I don't know how to delete it in the object browser.

Thanks in advance for any help you can give.
 
Try opening some source code (it doesn't matter what) and do a find on the text. Make sure its set to current database. If its there it will open whatever the source is in. If that doesn't work try using the Repair utility. It should find this problem. Sorry I can't be of more help.
 
Thanks Philly44.

But it didn't work.

I have found the code for it tho', here it is: -

Private Sub btnEdit_Click()
On Error GoTo btnEdit_Err
Me!PivotTable.Verb = acOLEVerbOpen
Me!PivotTable.Action = acOLEActivate
btnEdit_Exit:
Exit Sub
btnEdit_Err:
MsgBox Err.Description
Resume btnEdit_Exit
End Sub

I have no idea what it does as I don't actually know very much at all about VB.

Any suggestions on how to rid myself of this thing would be welcomed.

Ta
 
At the very least, It DID work. You just (aparently) did not follow through. The code you "found" using hte suggestion is part of SOME object. I would suggest you track down the OBJECT where this code is located. If it is something you need in your db, then come back to the code and just delete the procedures (Subs and Functions) whic are not part of your app. If the highest level object is not part of your app, delete the entire object. If you are using ver 2K, you can 'get to the "object" by clicking on the Project Explorer" Icon on the code window tool bar. That will open the project window with the current "Object" highlighted. Double click on this and it will open a window with the object. If the Object is a code module, the window may not actually change, since you are already in the window. If it is a form or report, it should open teh db window with the form or report in design view.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Thanks for your help MichaelRed.....but..

I opened 'Project Explorer' and there was 'Form_Form1' sat there under 'Microsoft Access Class Objects'. I double-clicked on it and the window opened with the code that's in the previous post. I deleted the code and attempted to delete the object. The code went fine but nothing happened when I tried delete with the object highlighted. Figuring an object with no code would be an improvement I closed the VB window and attempted to close the DB to save the changes. All I got was the message 'The form name 'Form1' is mispelled or refers to a form that doesn't exist.' After clicking the OK several times Access brought up the meesage that my changes couldn't be saved. I closed and re-opened the DB, went back to the object and there it was with all it's code intact. Oh yeah, when I right-click in the explorer window the 'View code' button is lit up but the 'View Object' button isn't and double-clicking on the object doesn't open anything.

Frustrating isn't it?

 
hi,

you can try to create a new db and import everything you find into the new db, hopefully the "damaged" object won't be copied with it

grtz

CPU-burn

 
Thanks CPUBurn It's certainly an idea but a last resort one I think.
 
hi aex,

why would that be a last resort? it's worth the try and not that much of an effort. in fact we have about 2.000 customers that are running about 20.000 similar databases and when one gets damaged, it's so standard to read it over into a new db that i wrote a tool for it to do it in one simple click...

cpuburn
 
OK, you've convinced me, I've imported everything over and as far as I can tell the non-existant 'Form1' hasn't come with it.

I just wish I knew how it had been created in the first place.

Thanks CPUBurn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top