473,729 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Function is not available in query expression - HELP

1 New Member
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 10875
comteck
179 New Member
I have never heard of the expression/function called "Left". What is it supposed to do?
Jul 14 '06 #2
zzqxxq
28 New Member
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 New Member
There is a good chance you have probably solved your problem with the "Function is Not Available"...et c, 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 Recognized Expert Moderator MVP
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
14943
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) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
8
9615
by: Henk van Winkoop | last post by:
Hello, I debugged some html file and found this: ------------------------------------------------------------ <script language="JavaScript"> if ( some_statement ) { function MyFunction ( some_argument ) {
7
3927
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 what I have now: mysql_query("UPDATE about SET category_id = 58 WHERE about_id = 5") or die('error: ' . mysql_error());
5
9539
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 in query expression SELECT IIf(IsNull(),"", & Chr(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"",] & IIf(IsNull(),"",", ") &
3
11901
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( & ", " & )'. It works fine at other clients. How can I resolve this? I do not see anything in the MS KB.
4
2134
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
2493
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 2006) $ Author: Collin Winter <collinw@gmail.com>, Tony Lownds <tony@lownds.com> Status: Draft Type: Standards Track
2
1725
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 available in expressions in query expression 'Format(,"$#,##0.00")' . 2. On Click Error : The expression you entered refers to an object that is closed or doesn't exist. 3. On Click Error : Function is not available in expressions in query...
5
6110
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. I learnt from the Microsoft Website and from this Group that this is problem is the result of a mismatch between the Computer where this database was developed and compiled on and the Computer where I am trying to run it.
0
8917
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.