Undefined function 'Left' in expression

B

Bob on Whidbey

My DB works fine on Access 2003. When I try to run it with Access 2007
I get the above error message. I suppose that the Left function is
used in some VB code, but I've not been able to find that. How do I
find the Left function, and what needs to be done so that this DB will
work on both versions of Access? Thanks.
 
J

James A. Fortune

Bob said:
My DB works fine on Access 2003. When I try to run it with Access 2007
I get the above error message. I suppose that the Left function is
used in some VB code, but I've not been able to find that. How do I
find the Left function, and what needs to be done so that this DB will
work on both versions of Access? Thanks.

I got that error when Access 2003 first came out. It was too buggy at
the time so a few users took Access 2003 off their machines and had
Access 97 installed beside Office 2003. It caused a mismatch in the DAO
versions (3.5 for Access and 3.6 for Office). Removing the Reference in
Access to DAO 3.5 and selecting the reference to DAO 3.6 solved the
problem. If none of your References are missing, try unselecting the
DAO 3.6 reference to see if it allows Access 2007 to find the Left
function. Also look at:

http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/c05c6ef80e69c4f6

As far as getting the DB to run on both versions, if you can't find a
combination/order of References that work, perhaps set them in code
differently depending on which Access version is being used. You'd need
to Google for that technique since it's late where I'm at and I need to
get some sleep, but I remember that it's possible.

James A. Fortune
(e-mail address removed)
 
A

Allen Browne

The message probably indicates that there is a problem with references.

If you are using both versions on a Windows Vista machine, you may need to
run Access with administrative priviliges so it can register the correct
library. Details in:
Errors using multiple versions of Access under Vista
at:
http://allenbrowne.com/bug-17.html

Alternatively, working directly on the references may help:
http://allenbrowne.com/ser-38.html

There may be a call to Left() anywhere: in code, in the ContolSource of a
text box, in a field in a query, ... Once Access realizes a library
references is broken, no code works at all.
 
B

Bob on Whidbey

When I first open the DB, I get an error message: ...missing or broken
reference to the file VSFLEX3.OCX. When I close that dialog box, I
get the msg: Undefined function Left in expression.

This DB has been running on WinXP under Access 2003 for 3-34 years
with out any problems. I was plleasantly surprised. I "upgraded" to
Vista and to Access 2007. Now I'm trying to add a new feature to the
DB. I copied the MDB file and it's back end DB over to my Vista
computer. I first changed the external data reference so they pointed
to the correct files (in a different folder on my computer than on the
WiniXP computer).
 
A

Allen Browne

Okay, so it's a broken reference. VSFLEX3.OCX is missing - either absent
from the machine, or not registered satisfactorily.

Follow the link given for references.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


When I first open the DB, I get an error message: ...missing or broken
reference to the file VSFLEX3.OCX. When I close that dialog box, I
get the msg: Undefined function Left in expression.

This DB has been running on WinXP under Access 2003 for 3-34 years
with out any problems. I was plleasantly surprised. I "upgraded" to
Vista and to Access 2007. Now I'm trying to add a new feature to the
DB. I copied the MDB file and it's back end DB over to my Vista
computer. I first changed the external data reference so they pointed
to the correct files (in a different folder on my computer than on the
WiniXP computer).
 
B

Bob on Whidbey

There is no VSFLEX3.OCX file on my computer - seems I have to download
a copoy. But it looks a bit scarey downloading the "free" copies
available on the web. Where's a good site to download a copy?
 
A

Allen Browne

VSFLEX3.OCX is not part of Access. You will need to track down (probably
from your old computer that has this library) who wrote it, and get it from
there.

The References menu (in the code window) will show you where it's
installed - typically in windows\system32. You can then right-click the file
in the Windows Explorer, and choose Properties to see who created it.

Are you sure your MDB actually uses this control? Try unchecking the
reference in the code window in Access. Then compile (Debug menu.) If it
compiles okay, you could be fine without it. Or you may be able to replace
the code that does not compile with something else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

There is no VSFLEX3.OCX file on my computer - seems I have to download
a copoy. But it looks a bit scarey downloading the "free" copies
available on the web. Where's a good site to download a copy?
 
B

Bob on Whidbey

Bingo! The VSFLEX3.OCX was not needed. I unchecked it from references
and everything is working fine. I had first searched all the VB code
for a reference to Left, and found none. Thank yo very much for
everything. G'Day!
 

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