Access 2007 Object Model Issue.

J

jpollock

Hello,

The application has 1 main form with 3 tabs on it. The 3rd tab is used to
search and find users records (can have multiple records). To view each
record’s details from the 3rd tab, double click on the record to view and the
values should appear in the correct controls on tab 2. The problem is that
the first time you double click on the record from tab 3, the application
changes focus too tab 2 (this is correct) but fails to fill in the controls
with the data. Now, if you return back to the 3rd tab without searching and
double click the same record, you will find that the controls on tab 2 are
now filled in with correct data. The error that I receive is: “You entered an
expression that has an invalid reference to the property Form/ Report.â€
There is no issue within Access 2003. The controls on tab 2 are filled in
from the original double click on tab 3. This application was built
originally in Access 2000 and then modified in Access 2003. We are now
running Access 2007 environment.
Thanks
 
J

jpollock

Thanks Paul.
I took a look over there and didn't find anything pertaining to my error. I
also check
Microsoft's list of bugs.
Thanks again.
 
A

Allen Browne

Try a decompile, followed by a compact.

This sequence would be worth trying in order:

1. Uncheck the boxes under:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Office Button | Manage | Compact/Repair

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 (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and the VBA options are set to show errors
and avoid this kind of corruption.

If the error still occurs after this, take note of:
a) when it occurs, and
b) which line generates the error
and post back.
 

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