August 4, 2005 at 3:29 am
Hi
I have used the left function in several Access queries. This is in a query, not VBA:
Fieldname=left([field],2)
This gives me a column of just the two left characters of a field.
Now I have updated to Access 2003 it doesn't work. When I run the query it returns the error message:
'Undefined function 'left' in expression'
Has anybody any ideas about this. This still works fine in Query Analyser TSQL - is it no longer available in Access?
Paul
August 5, 2005 at 2:11 am
Paul,
Hi! My first debug step would be to check the tools\references in my modules and be sure that there is nothing missing. If something is missing, it can cause "Ghost" errors to occur. I just had this happen to me tonight. I had a reference to an activex control that was not installed on a user's machine. When I copied the app to their side and tried to compile, I got an error on a Mid$ call. Now, the activex reference was the culprit but the compile error falsely identified the mid$ call as an error. I'll bet you have a missing or broken reference in your application. The left function is a standard part of the 11.0 dll. MDAC 2.8 or DAO 3.6 may get you, although I'll bet is a reference to some other add-in that is broken.
Hope that helps.
Best Regards,
Mike Jensen
August 5, 2005 at 2:29 am
Hi Mike
Absolutely right.
The Wuaueng.dll reference was showing as missing?? The file was there and I just had to remove then reinstate it. All is now working great.
Many thanks
Paul
August 5, 2005 at 6:22 am
just an additional thought: When I have 'internal' access issues, I've found that creating a new .mdb and importing all the objects fixes many things. It's saved hours of debugging. It dosen't always work, but it mostly does.
August 5, 2005 at 7:17 am
Place this line of code into a module. Then, call this line of code from your update query:
Function cLeft(sVal As String, lLen As Long)
cLeft = VBA.Left(sVal, lLen)
End Function
August 5, 2005 at 7:52 am
I have been saved by the new mdb dodge several times before......
The left function is great and I'll find it very useful.
Everybody's helfulness makes this an excellent site.
Many thanks
Paul
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply