I have come across this when an object library is required but has not been referenced (Tools...References) or a control has been used but not properly registered. Then certain functions fail e.g. Left().
Is there any additional control or reference on any of your forms?
Is the application one you have built on your own machine or supplied by someone who had Visual Basic/Visual Studio on their machine?
A possible solution may be to open a blank database and using File...Get ExternalData...Import and import all the tables, forms etc. from the original .mdb.
A Tools...Compact and Repair may help.
I remember similar problems with this. Somtimes you can get into real difficulties with Access and it can take ages to sort out.
I did check on references and they all seemed to be okay.
What happened and I know not why is I found a Null in the argumants of mid(). I had to go out of ACCESS and come back in with the Null problem fixed and it worked.
If anyone knkows the mechanism, please share it with me.
Another option to try when a standard function doesn't work is to open up any code module, click on tools references and then click on any reference (be sure to note which one you clicked on). Then click on OK and click on Tools References and unclick the reference you clicked on above. After that, click on OK and then click on Debug, Compile and Save all Modules. After that, it should work again. You may also want to compact the database if you have time.
Access library references are prioritized. So if the DAO lib is way down in the list with the ADO libs above it, DAO commands won't work. Old mainframe programmers who had to use JCL knows what I mean.
Also, and this is sick, sometimes you will get an error, click on "DEBUG", go into VBA, select or change the position of a reference, come out of VBA and still get the error because the reference didn't take. So you must close the VBA opened from DEBUG, reopen VBA, make the reference, close VBA and then it works.
I have the problem that I have an early verion library, I select a later version library and try to prioritise it and VB says - 'Sorry, can't prioritise because the (early version' library is currently in use'!
Total waste of time. You've got to 1st get rid of the earlier version and THEN add the later.
Regards
Darrylle
"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.