Invalid reference -- what to do

J

jpm

Hello,

I'm reposting in this newsgroup at user suggestion in vb newsgroup.
What responder to my message is indicating is that I can loop through
references collection in VB to reset the reference to the different Access
type library version present on the user's PC?

Thanks for any suggestions,

Jim M.
Hi,

VB6
I'm building Jet database tables. Then I'm calling msAccess to open a
pre-existing report. Problem is that users are experiencing
the errors relating to invalid references. In this case the error is
"Undefined function 'trim' in expression."

The root cause is actually within the jet database which has a missing
reference to the version of the access type library that
I'm using on the developer machine. This wouldn't be happening if I
weren't calling vba code from within the report, but I am.
If the user has a different version of the msOffice/Access installed, the
error is raised.

Is there a programmatic workaround? Before calling the report open
command from VB6 can I redirect the reference to the version
installed on the PC of the user attempting to run the report?


The Access object library has a Reference object and a References collection
you can use to change references. I used to have code
that would "reset" references, but that was a number of years ago when I
worked for a company that used Access a lot. In any case,
you'd probably get better luck with this if you ask in an Access newsgroup
because it really doesn't have anything to do with your
VB6 app.
 
R

ruralguy via AccessMonster.com

Maybe this link will be helpful:
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

I usually solve that issue with Late Binding:
http://www.granite.ab.ca/access/latebinding.htm

Hello,

I'm reposting in this newsgroup at user suggestion in vb newsgroup.
What responder to my message is indicating is that I can loop through
references collection in VB to reset the reference to the different Access
type library version present on the user's PC?

Thanks for any suggestions,

Jim M.
[quoted text clipped - 14 lines]
command from VB6 can I redirect the reference to the version
installed on the PC of the user attempting to run the report?

The Access object library has a Reference object and a References collection
you can use to change references. I used to have code
that would "reset" references, but that was a number of years ago when I
worked for a company that used Access a lot. In any case,
you'd probably get better luck with this if you ask in an Access newsgroup
because it really doesn't have anything to do with your
VB6 app.
 

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