Wednesday, June 09, 2004

 

Functions With Names Beginning With P

The problem with a series of posts like this one is that things only get interesting when something goes wrong. A post that says ‘I tested this, and it works, and I didn’t encounter any problems’ isn’t really very interesting, and that’s exactly what happened today. Not to worry, I will persevere, in the confident expectation that something will go wrong real soon now! :-)

There are four VBA functions with names beginning with the letter ‘P’, the Partition(), PMT(), PPMT() and PV() functions. Here’s the SQL for a query that uses all four of these functions. As always in this series, this rather strange query is not intended to return a meaningful result, it is merely a test bed for the functions:

SELECT 
    Partition([TestInteger],1,10,2) AS TestPartition, 
    Pmt([TestDouble],[TestInteger],[TestDouble],[TestCurrency],1) AS TestPmt, 
    PPmt([TestDouble],[TestInteger],[TestInteger],[TestDouble],[TestCurrency],1) AS TestPPmt, 
    PV([TestDouble],[TestInteger],[TestDouble],[TestCurrency],1) AS TestPV 
FROM tblTest;

As indicated above, this query executed with a boring lack of problems both within Microsoft Access and via our C# ‘JetTest’ utility (see previous posts). So we can now add these four functions to our list of VBA functions that can be used in Jet queries when executed outside of the Microsoft Access environment:

The Partition(), PMT(), PPMT() and PV() functions.


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.


Tuesday, June 08, 2004

 

Functions With Names Beginning With O

First, my apologies for the long, unannounced hiatus in posting – I had a one week holiday, and then it took me another week to get caught up on all the things that piled up during the holiday, you know how that goes!:-)

Continuing our alphabetical investigation of VBA functions that can be used in Jet queries, there are just two functions (or two variations of one function) with names beginning with the letter ‘O’, the Oct() and Oct$() functions. Both of these functions work as documented in queries both within Access and when executed via our C# ‘JetTest’ utility (see previous posts). Here’s the SQL statement for a query that uses these two functions:

SELECT 
    Oct([TestInteger]) AS TestOctVar, 
    Oct$([TestInteger]) AS TestOctString 
FROM tblTest;

So we can add these two functions to our list of VBA functions that can be used in Jet queries when executed outside the Microsoft Access environment:

The Oct() and Oct$() functions.


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.


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