Invalid reference to the property |

  • Thread starter Thread starter Larry Jones
  • Start date Start date
L

Larry Jones

What the heck does this message mean?
"You entered an expression that has an invalid reference to the property |."

I have a form, with a subform. When I press the delete button (which runs
the RunCommand using DeleteRecord) I get the typical warning about deleting
a record which will cause records in other tables to be deleted (no problem,
user wants that).

But then, after it's deleted, I get this error message. In debug, it's
stopping on the RunCommand statement, even though the record is deleted. I
have put debug statements in all my subroutines in both forms and none of
them appear to throw an error.

To narrow it down, I decided to delete the subform from my form and try a
delete. I did not get the error when I did this. So naturally I figure it
has something to do with the subform. But I can't figure what.

Both the form and subform are bound to queries, with no controls that are
unbound.

Any suggestions?

TIA
 
Larry, this is probably another Name AutoCorrect corruption.

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://members.iinet.net.au/~allenbrowne/bug-03.html

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

3. Decompile a copy of 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. Compact again.

5. Open this form's module in design view, and make some changes. For
example, replace the RunCommand line with this:
If Me.Dirty Then Me.Dirty = False

6. Check that it compiles correctly. From the code window:
Debug | Compile.

Post back a followup if that does not solve the issue.
 
Back
Top