Can't change VB Reference (DLL) library

K

Ken Smith

The State agency where I work uses Office Pro 2003. I recently upgraded my
home PC to 2007. I frequently use my home PC to work on an Access 2003
application and each time I do, the Microsoft Outlook 11 Object Library (no
longer available on my home PC) is replaced with that for Outlook 12.

Back in my agency office, I have corrected this once before and was able to
change the reference to version 11 but today, all efforts to do so crash and
I get the message "Can't perform requested operation." The help button
suggests:

1. the requested operation would invalidate the current state of the
project or

2. a attempt was made to programmatically modify currently running code ...
that you can't make modifications to a running module.

.... but I opened the application using the shift key and went straight to
the Code icon (bejewelled square icon) and did not open a form, report, or
code module before attempting to make the change. I've even tried Debug/Reset
and nothing I do works.

So, HELP!!!!!!! I don't know what to try next.

My VB is not strong so I will need specific steps if I have to go that route
to make the fix.

In advance ... Thanks and have a Happy Holiday Season.
 
S

Stefan Hoffmann

hi Ken,

Ken said:
The State agency where I work uses Office Pro 2003. I recently upgraded my
home PC to 2007. I frequently use my home PC to work on an Access 2003
application and each time I do, the Microsoft Outlook 11 Object Library (no
longer available on my home PC) is replaced with that for Outlook 12.
Get rid of that reference by using late binding:

http://www.granite.ab.ca/access/latebinding.htm

mfG
--> stefan <--
 
D

david

Make a backup copy of the database.

Then do a 'decompile' by using the /decompile command line switch.

To do that, you have to create a shortcut to MSAccess.exe
Then you have to modify the shortcut to also include the path to your
database:
"full path to msaccess.exe" "full path to my database"

Then you have to add the /decompile option:
"full path to msaccess.exe" "full path to my database" /decompile.

Use that shortcut to open your database, and try again to remove the broken
reference.

(david)
 
K

Ken Smith

Thanks, David. Your solution was so much easier to understand than the one on
latebinding and the absolutely most important part is IT WORKED.
 
D

david

Thanks :~)

But his answer is also correct:
now that you have fixed the immediate problem, you should move to late
binding. :~)

(david)
 
T

Tony Toews [MVP]

Ken Smith said:
Thanks, David. Your solution was so much easier to understand than the one on
latebinding and the absolutely most important part is IT WORKED.

Late binding is the best long term solution.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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