Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undefined function 'Trunc' in expression

Status
Not open for further replies.

Jembo

MIS
Dec 20, 2004
38
0
0
GB
I am getting

Undefined function 'Trunc' in expression

when working in SQL view in Access 2000.

I have the following library objects checked;

Visual Basic for Applications
Microsoft Access 9.0 Object Library
Ole Automation
Microsoft Access DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library

There are 5 other 'Visual Basic for Applications' objects, each with a different file location. Do all of these need to be referenced?

Is there anything else that should be checked under the Tools/References option?
 
There is no trunc() function in Access.
What are you trying to do with this function?
 
Have a look at the Int, Fix and Round functions.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So even though I am in SQL view, I can't write SQL?
 
If you create a SQL passthrough query you can write what you like; but not in an Access query on a linked table.
 
Trunc" is not a standard (ANSI) SQL function. from just he name, I would assume it is intended to TRUNCATE (e.g. limit the length of) a string expression. In VB(A) this is usually acomplished with some combination of the "Left", "Mid" and/or "Right" intrinsic functions.





MichaelRed


 
Are you using in an Access MDB or ADP file? When you reference an SQL View it seems to indicate an ADP.
 
I am in SQL view on a MS Accesss query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top