troubleshooting Question

VBA error 3057 & 3075 - Refresh References question

Avatar of WoodrowA
WoodrowAFlag for United States of America asked on
Microsoft AccessVisual Basic Classic
7 Comments1 Solution1092 ViewsLast Modified:
I am using Access 2007.
I am finding that when I send my appliadtion to another machine it may or may not work on that machine.  After sending the applciation to another machine I get an error message of 3057 or 3075, when running a certain query that involves the Format Function on a date field.  The message is "Function isn't available in expressions in Query Expression".  

There is a simple solution.  I go into the VBA and add a reference.  Any reference will do.  Just this simple act of adding the reference somehow refreshes the thinking on the client machine.  I don't even have to recompile or Save.  Just by doing the above, if I then re-run the query, everything is fine.

So what's the problem?  The problem is that I am adding this reference manually to the client machine, but there may be times in the future where the client will be running a Runtime version of Access and so adding a manual reference to VBA will not be an option.

I'm wondering if there is a code equivilent?  Is there some innocous reference I could add using code.  It does not seem to matter what you add.  Just by adding any reference in VBA (tools menu, references) causes Access to get its thinking right again.

Anyone?
ASKER CERTIFIED SOLUTION
ee_auto

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros