bug in form event code

G

gator

the following code reponds to a button click in form1....

DoCmd.OpenForm "DepositsQuery2009Detail"
DoCmd.GoToRecord acDataForm, "DepositsQuery2009Detail", acLast

also, there is code in DepositsQuery2009Detail form

Private Sub Amount_AfterUpdate()
DoCmd.Close acForm, "DepositsQuery2009Detail"
End Sub

It was working fine but now when I hit the enter key to execute the
Amount_AFterUpdate code, I get the message "the form name 'FormName' is
mispelled or refers to a form that doesn't exist.

the form 'FormName' is a deleted form in my database but is still listed as
a class object in VB. Is there a way to delete it from the list of class
objects? I have saved the DB and closed Access but that didn't help. any
ideas?
 
G

gator

now just about any thing I do in the form I get the message, module not
found...what is going on here???
 
T

tina

if you're using Access 2000 - Access 2003, suggest you create a new blank
database and immediately turn OFF the Name Autocorrect options, under Tools
| Options | General tab. then compact the db. then import all the objects
from your "live" db, and compact again.

then open any VBA module and compile the code, fix any compile errors until
you get a successful compile, then compact the db again. if you continue to
have problems after all that, i'd suggest doing everything again EXCEPT
don't import the problem form into a new db. import everything else, and
rebuild the problem form from scratch.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top