By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

Form1 misspelled or missing

JustJim
Expert 100+
P: 407
Somebody (possibly me, but I'm not admitting to it!) apparently started to design a new form and then changed their mind. It got saved to the generic name Form1. I deleted it (via the Database Window) but now when I'm in VBA I can still see Form_Form1 in Project Explorer but it has no code associated with it.

I now get heaps of instances of the same error message telling me that the form is misspelled or missing.

I'm also getting "Module not found" error messages when opening other forms!

Any pointers on how I can remove any references to this Fantom Phorm? It's not vital because I'm working on a copy of the application and can just import the new forms I've written into the "real" version. The real version still has the mysterious Form1, but there it causes no problems!

Thanks in advance guys

Jim
Aug 29 '07 #1
Share this Question
Share on Google+
26 Replies


Scott Price
Expert 100+
P: 1,384
Assuming you have already tried a Compact Repair without any results, try the decompile method mentioned here: http://allenbrowne.com/ser-47.html . (Actually might be a good idea to read the whole page before trying anything :-)

Sounds like your database has gotten confused in one of the many levels of compile/decompile. Hopefully that Gormless Fantom Phorm will disappear.

Regards,
Scott
Aug 29 '07 #2

JustJim
Expert 100+
P: 407
Assuming you have already tried a Compact Repair without any results, try the decompile method mentioned here: http://allenbrowne.com/ser-47.html . (Actually might be a good idea to read the whole page before trying anything :-)

Sounds like your database has gotten confused in one of the many levels of compile/decompile. Hopefully that Gormless Fantom Phorm will disappear.

Regards,
Scott
Thank you Scott. I've glanced at the link and I'll take your advice and read it through. Looks very helpful though.

Jim
Aug 29 '07 #3

JustJim
Expert 100+
P: 407
Scott,

Take a pat on the back out of petty cash! Thank you. That Allen Browne link is now printed and in my briefcase, saved on my USB key and in my browser favourites. Very handy stuff.

Jim
Aug 29 '07 #4

Scott Price
Expert 100+
P: 1,384
Thanks Jim! Glad you liked it... Allen's site is one of my favorites.

Just wondering, though... Did the decompile do the trick, or was there another tip there that helped out?

Regards,
Scott
Aug 29 '07 #5

JustJim
Expert 100+
P: 407
Thanks Jim! Glad you liked it... Allen's site is one of my favorites.

Just wondering, though... Did the decompile do the trick, or was there another tip there that helped out?

Regards,
Scott
I actually only got as far as the "Symptom: Cannot open a form or report" solution which imports stuff into a new blank database. Since my Fantom Phorm was not showing in the Database Window (only in Project Explorer in VBA) I just clicked the all tabs and Select All'd and Hey, Presto!

Jim
Aug 29 '07 #6

JustJim
Expert 100+
P: 407
Well actually now that I've had a further play, that wasn't ideal because even though I ticked the box to import relationships... no relationships. I could re-define them but I'm going to go ahead and try the de-compile trick just for "fun"!

Will let you know.

Jim
Aug 29 '07 #7

JustJim
Expert 100+
P: 407
No, de-compiling didn't help either. I have simply imported the forms I was designing into the "real" version of the application. The dreaded Form1 exists there but it is reflected in the Database window as well as in Project Explorer so it doesn't appear to cause any problems!

Another one to revisit another time.

Jim
Aug 30 '07 #8

Scott Price
Expert 100+
P: 1,384
No, de-compiling didn't help either. I have simply imported the forms I was designing into the "real" version of the application. The dreaded Form1 exists there but it is reflected in the Database window as well as in Project Explorer so it doesn't appear to cause any problems!

Another one to revisit another time.

Jim

Hmmmm... I wonder if you first went in and deleted the form's module, then later deleted the form itself? This smells like a corruption problem to me, just trying to finesse around it may not work in the long run...

I wonder if anyone else has any other ideas, or has run into this before?

Regards,
Scott
Aug 30 '07 #9

MMcCarthy
Expert Mod 10K+
P: 14,534
Jim

I can't remember which version of Access you use but I know there are problems with form modules in Access 2000 which can be fixed by applying one of the three office updates. Not sure which one but its a good idea to apply all three.

I've only ever seen this kind of corruption in Access 2000. However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

Mary
Aug 30 '07 #10

JustJim
Expert 100+
P: 407
Jim

I can't remember which version of Access you use <snip> However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

Mary
Oooh You're full of fun and good news today, Mary! I've got a week left on this assignment then they can call me back on call-out fees! There are valueable reasons for not writing bug-free code, you know!

Only joshin' (well a little bit)

Jim
Aug 30 '07 #11

NeoPa
Expert Mod 15k+
P: 31,560
Oooh You're full of fun and good news today, Mary! I've got a week left on this assignment then they can call me back on call-out fees! There are valueable reasons for not writing bug-free code, you know!

Only joshin' (well a little bit)

Jim
Far too cynical Jim ;)
Just to chip in and say that I too have come across this problem using Access 2K. I had to rebuild or restore from backup when I found the problem. I have all SPs applied so, while that is always very good advice, it may not completely resolve the problem.
To test my DBs for corruption I will close all code windows and do a compile. If the DB is healthy it will work. If not it will hang part way through. I try to do this regularly so that I have to repeat as little work as possible. The new code is easily applied to an old copy as it is copy/pastable still. New (possibly dodgy) objects will need to be recreated.

I hope this helps.
Aug 30 '07 #12

Denburt
Expert 100+
P: 1,356
Interesting thread, although I have not witnessed this particular issue I would suggest checking the collections using vba. if you can see it using vba cycling through the forms or module collections try to delete it that way...

i would also like to say that Neo has some very interesting points.
Aug 30 '07 #13

Scott Price
Expert 100+
P: 1,384
Thanks Mary and NeoPa for taking a look and your help!

Just curious, Jim, do you have the Name AutoCorrect feature enabled? There seems to be an inordinate number of bugs with this feature, and just wondering if you're running into some problems with it...

Allen Browne (again): http://allenbrowne.com/bug-03.html

Regards,
Scott
Aug 30 '07 #14

Denburt
Expert 100+
P: 1,356
I've only ever seen this kind of corruption in Access 2000. However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

Mary

Mary an existing form becoming corrupted has PLAGUED me for years and I just found out that you can usually still export the corrupted form as text using VBA then reimport it the same way and off you go. Worked like a champ. I have this issue ALL the time, I think it is because of the size of my front end databases.
Aug 30 '07 #15

MMcCarthy
Expert Mod 10K+
P: 14,534
Mary an existing form becoming corrupted has PLAGUED me for years and I just found out that you can usually still export the corrupted form as text using VBA then reimport it the same way and off you go. Worked like a champ. I have this issue ALL the time, I think it is because of the size of my front end databases.
Yes I've done that. I haven't had the problem since I applied all three updates on office 2000 though.
Aug 30 '07 #16

Denburt
Expert 100+
P: 1,356
Yeah can't copy and paste the version info but I am currently using 2003 (11.6566.8132) SP2. Last I checked all updates were installed and I still had it happen.
Aug 30 '07 #17

MMcCarthy
Expert Mod 10K+
P: 14,534
Yeah can't copy and paste the version info but I am currently using 2003 (11.6566.8132) SP2. Last I checked all updates were installed and I still had it happen.
Hmmm!

Don't use 2003 that often. Most of my clients are still on 2000.
Aug 30 '07 #18

NeoPa
Expert Mod 15k+
P: 31,560
Hmmm!

Don't use 2003 that often. Most of my clients are still on 2000.
M$ do like to back-port their 'features' :D
Aug 31 '07 #19

Jim Doherty
Expert 100+
P: 897
Yeah can't copy and paste the version info but I am currently using 2003 (11.6566.8132) SP2. Last I checked all updates were installed and I still had it happen.

I,ve used SaveFileasText and LoadFromText a number of times as the solution for some corrupted frontends and you're dead right, its never not done the business
Aug 31 '07 #20

JustJim
Expert 100+
P: 407
Wow, you have all been busy while I've been away over the weekend! As I said, I'm back in the "real" application after creating some new forms in a copy. The fantom Phorm still exists in this copy, but it is not causing any problems so I'm happy to leave it for the time being.

It seems to have caused quite a reaction from many experienced people though. I love this forum!

Jim
Sep 2 '07 #21

NeoPa
Expert Mod 15k+
P: 31,560
Jim,

My advice (should you care to accept it) is "Always work clean".
By that I mean, never knowingly leave 'crap' in your work. It's unpredictable, and may come back and bite you in the rear-end when you least expect it.
I don't know all your circumstances so this is only advice and it's up to you what you choose to do of course.
Sep 3 '07 #22

JustJim
Expert 100+
P: 407
Jim,

My advice (should you care to accept it) is "Always work clean".
By that I mean, never knowingly leave 'crap' in your work. It's unpredictable, and may come back and bite you in the rear-end when you least expect it.
I don't know all your circumstances so this is only advice and it's up to you what you choose to do of course.
You are, as always, absolutely correct. I can only plead that I am, as always, under attack from the Dread Foe, the Great Enemy - Time.

I will fix it, I semi-promise!

JIm
Sep 4 '07 #23

Denburt
Expert 100+
P: 1,356
Couple of things I thought you might give a go at is this, Changing Deadmod for your Modules name.

Sub DeleteModule()
DoCmd.DeleteObject acModule, "DeadModule"
End Sub


Check to see if the form still exists where you may not be able to see it. If it does you can use something similar to delete it.

Expand|Select|Wrap|Line Numbers
  1.    For Each doc In Frmcon.Documents
  2.         Set doc = Frmcon.Documents(doc.Name)
  3.         Debug.Print doc.Name
  4.           Entries = Entries + 1
  5.         'End If
  6.     Next doc
  7.  
Good Luck let us know if this helps.
Sep 5 '07 #24

JustJim
Expert 100+
P: 407
Couple of things I thought you might give a go at is this, Changing Deadmod for your Modules name.

Sub DeleteModule()
DoCmd.DeleteObject acModule, "DeadModule"
End Sub


Check to see if the form still exists where you may not be able to see it. If it does you can use something similar to delete it.

Expand|Select|Wrap|Line Numbers
  1.    For Each doc In Frmcon.Documents
  2.         Set doc = Frmcon.Documents(doc.Name)
  3.         Debug.Print doc.Name
  4.           Entries = Entries + 1
  5.         'End If
  6.     Next doc
  7.  
Good Luck let us know if this helps.
When I say that I see the form in Project Explorer, it is under "Microsoft Office Access Class Objects" not under "Modules". I will try this, but using

DoCmd.DeleteObject acForm, "Form1"

instead. I'll get back to you.

Jim
Sep 6 '07 #25

JustJim
Expert 100+
P: 407
When I say that I see the form in Project Explorer, it is under "Microsoft Office Access Class Objects" not under "Modules". I will try this, but using

DoCmd.DeleteObject acForm, "Form1"

instead. I'll get back to you.

Jim

No...
Error 7874
(My application name) can't find the object 'Form1'

Back to the drawing board!

Jim
Sep 6 '07 #26

Denburt
Expert 100+
P: 1,356
Sorry I can't offer more advice I will keep my eyes peeled though. I just opened one of my apps and BAMM corruption so it looks like I am going to have a good day. Probably just another form needing the dreaded export import.

Good Luck and let us know if you find a solution.
Sep 6 '07 #27

Post your reply

Sign in to post your reply or Sign up for a free account.