473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Function is not available in query expression - HELP

Hi everyone

I have created a small db, in access 2000, on my own test machines it works excellent, however, upon transferring it to my colleague, I expierience a strange error code

Function is not available in query expression - 'Left([employee]![dob],2)'

In English - I am trying to pull the first digits in the date of birth, in example 12/08/2006 - should return 12.

This i no problem on my own machine, which have access 2000 (9.0.2812) running on an XP H.E. Sp. 2, however on my colleague's machine he has access 2000 (9.0.6926) sp3

I however fail to see that differences in build number should create this problem.

I have tested my colleagues access, it seems the problem occurs every time i try to use either left, mid or right.

Any good ideas would be highly appreciated.

Best regards
Jesper Hornum
Jul 14 '06 #1
4 10846
comteck
179 100+
I have never heard of the expression/function called "Left". What is it supposed to do?
Jul 14 '06 #2
zzqxxq
28
Can't seem to duplicate your error message - I got a different one "The expression is too complex to be evaluated.... blah blah blah", but you are right this is a little strange as you can indeed specify as criteria a vB function and Left(string,len) is a legitimate function. I have never tried to use the function in the way you seem to be though.

It looks to me like [employee]![dob] is a reference to a field in a table that may or may not be open at the time the query is run. If it is an external reference, why not just include the employee table in the query and make the dob field a column in the query? Then you can specify an expr1 column to represent a simplified cirterion of Left([dob],2) dropping the external reference. That worked for me everytime I tried it that way. Hope that helps.

Best Regards,
Jul 16 '06 #3
spike
1
There is a good chance you have probably solved your problem with the "Function is Not Available"...etc, but here's an answer anyway.

Left, Right, Format (there are others) are all VB commands and even though you are using them in a Query you need to make sure that the module Type Library exists or is correct.

Basically if you start a new module click Tools then References, you should get a pop box. Find the reference called "Microsoft Jet and Replication Objects Library" and make sure it's ticked.

Now your Query will run!!

This can happen when you run a database on another computer that has a new version of these references or if it hasn't been ticked. Not 100% sure exactly what these references are but i think they translate the different languages/commands to work in Access.
Aug 24 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
Jesper

In Tools - References on your own system check the libraries that are ticked and the order in which they are ticked. Then go to your colleagues system and check again. You will find that either there is a library missing or that they appear in a different order.

I don't know why the order is important but in my experience it can make a difference. However, the Libraries are a series of prewritten functions in VBA. If you want to use a function in VBA you either have to tick a reference to the library or declare it for use at the top of your code.

The Left() function is a prewritten function. I'm not sure what library its in but you will see when you compare your library list to your colleagues.


Hi everyone

I have created a small db, in access 2000, on my own test machines it works excellent, however, upon transferring it to my colleague, I expierience a strange error code

Function is not available in query expression - 'Left([employee]![dob],2)'

In English - I am trying to pull the first digits in the date of birth, in example 12/08/2006 - should return 12.

This i no problem on my own machine, which have access 2000 (9.0.2812) running on an XP H.E. Sp. 2, however on my colleague's machine he has access 2000 (9.0.6926) sp3

I however fail to see that differences in build number should create this problem.

I have tested my colleagues access, it seems the problem occurs every time i try to use either left, mid or right.

Any good ideas would be highly appreciated.

Best regards
Jesper Hornum
Aug 24 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
8
by: Henk van Winkoop | last post by:
Hello, I debugged some html file and found this: ------------------------------------------------------------ <script language="JavaScript"> if ( some_statement ) { function MyFunction (...
7
by: John Moore | last post by:
Hi I posted three days ago about a function I wrote which kept refusing to run a mysql_query. Well I did away with the function, and hard coded the variables into the query itself. Here's...
5
by: deko | last post by:
After developing an MDB in Access 2003 on WS03, then making it into an MDE and deploying it on a WinXP box with Access 2003 installed, I get this error: Function is not available in expressions...
3
by: pw | last post by:
Hi, I created and distributed an Access 2003 MDE. When the user opens up a form he get's an error message :Function is not available in expressions in query expression 'Trim( & ", " & )'. ...
4
by: alex | last post by:
I am so confused with these three concept,who can explained it?thanks so much? e.g. var f= new Function("x", "y", "return x * y"); function f(x,y){ return x*y } var f=function(x,y){
4
by: Tony Lownds | last post by:
(Note: PEPs in the 3xxx number range are intended for Python 3000) PEP: 3107 Title: Function Annotations Version: $Revision: 53169 $ Last-Modified: $Date: 2006-12-27 20:59:16 -0800 (Wed, 27 Dec...
2
by: deependrapathak | last post by:
Hi All, I am currently facing a crutial problem in Access2003 in Windows XP on just 3 PCs, the Application throws some of the errors specified below : 1. Error Number : 3075 Function is not...
5
by: elie.constantine | last post by:
Hello A person developed a Microsoft Access Solution and gave me the MDE file. When I tried to run it, I got "Function is not available in expressions in query expression 'Trim([......" Error. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.