Monday, May 17, 2004

 

Functions in Microsoft Jet Queries

Functions with Names beginning with M

The MacID and MacScript functions are only used on the Apple Macintosh, and the MIRR and MsgBox functions both failed when used in a query within the Microsoft Access environment. The following SQL statement includes all of the functions with names beginning with M that executed without error within the Microsoft Access environment:

SELECT 
    Mid([TestText],Len([TestText])\2) AS TestMid, 
    Mid$([TestText],Len([TestText])\2) AS TestMidS, 
    MidB([TestText],Len([TestText])\2) AS TestMidB, 
    MidB$([TestText],Len([TestText])\2) AS TestMidBS, 
    Minute(Now()) AS TestMinute, 
    Month(Now()) AS TestMonth, 
    MonthName(Month(Now())) AS TestMonthName 
FROM tblTest;

When executed via JetTest, only the MonthName function failed. The following, then, is the list of functions with names beginning with M that can be added to our list of functions that can be used in Jet queries executed outside of the Microsoft Access environment:

Mid, Mid$, MidB, MidB$, Minute, and Month.


Send feedback on this post to (change the obvious):

Brendan Reynolds
bwnnfb at hotmail dot com

(For the insatiably curious, "bwnnfb" is an acronym for "Blog With No Name Feed-Back")

Copyright © 2004 Brendan Reynolds. All rights reserved.


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?