Error 438... Again

J

JamesJ

Again, I'm getting this error simply from making a minor
change to the form. It works fine in all other forms.
Can this form get corrupted so often that I can't
make design changes to it? I've replaced the form
twice by importing it and I've created a new form. I"m now
at a loss.

Error '438': Object doesn't support this Property or Method.

This error is occurring only on one form in my mdb
and four backups that I made this and last month.

Again, I've been using this same function for a couple years with
no problems. Also, on another form the validation code gets ignored (no
error message).
The code runs fine on my other four forms.
 
A

Allen Browne

The corruption could be a an inconsistency between the Text and Compiled
version of the code. Importing into a new database does not solve this kind
of corruption, but it can be solved with a decompile. It might also be a
recurring Name AutoCorrect corruption.

Try this sequence:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.

If the corruption still occurs you could try exporting the form as text,
deleting it, and importing it again. The commands (undocumented) are:
SaveAsText acForm, "Form1", "C:\Form1.txt"
and then after you delete the form and compact the database:
LoadFromText acForm, "Form1", "C:\Form1.txt"

For suggestions on how to prevent corruption, see:
Preventing Corruption
at:
http://allenbrowne.com/ser-25.html
Particularly important are the first 5 under "Preventing corruption during
development".
 
J

JamesJ

I found that a field name I renamed a while back didn't get changed
in the form's code.(I must have overlooked it). Why I didn't get any
error messages and the db has been compiling I don't know. Not
even sure if it is the cause of the corruption.

Thanks for help.
As always I'll take your advise.

Thanks again,
James
 

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

Similar Threads

Error 438 2
Run-Time error 438 5
438 Error 3
SetFocus on embedded subform - error 438 2
438 Error with Calendar Object 1
Error 438 2
Requery listbox runtime error 438 2
Run time error 438 1

Top