undefined function 'left' in expression.

G

Guest

I have created a query containing a left statement but get this error. Can
anyone help?

SELECT DISTINCTROW Left([File_Name],Len([File_Name])-4) AS [File Name],
tbl_SAR_Header.Team
FROM tbl_SAR_Header
WHERE (((tbl_SAR_Header.Team)=is_return_variable("SAR_Query_Team_Name")) AND
((tbl_SAR_Header.Return_Date) Is Null))
ORDER BY Left([File_Name],Len([File_Name])-4);
 
S

Stefan Hoffmann

hi,
I have created a query containing a left statement but get this error. Can
anyone help?
It is maybe a broken refernce: check VBA.DLL.

How do you call this query?

mfG
--> stefan <--
 
G

Guest

It could be a broken reference, the server names have been changed in the
office and the database has developed a couple of bugs.....

The query is a row source for a combo box on a form. When I click the arrow
I get a message appear giving me the old server name and saying it is not a
valid path. I have updated the references in VB to the MDA DB's.

When I try and run the query from design mode, I get the undefined function
error.

Where does VBA.dll reside? I cannot find it on the system.

Cheers,
Steve.
 
D

Douglas J Steele

In actual fact, it's seldom the VBA reference that causes the problem.

Because of how Access searches for functions, the VBA library is one of the
last places it looks (this is so that you can replace built-in functions
with your own functions). Just follow the usual advice to check for broken
references:

Open any code module, then select Tools | References from the menu bar.
Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected.

(NOTE: write down what the references are before you delete them, because
they'll be in a different order when you go back in)
 
S

Stefan Hoffmann

hi,
The query is a row source for a combo box on a form. When I click the arrow
I get a message appear giving me the old server name and saying it is not a
valid path. I have updated the references in VB to the MDA DB's.
You are using VisualBasic?
Where does VBA.dll reside? I cannot find it on the system.
Microsoft Shared\VBA\VBA6 in your shared files folder.

But you have to check the reference in Access, open the VBA editor, go
to Extras, References.

mfG
--> stefan <--
 

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