PC Review


Reply
Thread Tools Rate Thread

Ceiling function in Access

 
 
Paul LeBlanc
Guest
Posts: n/a
 
      19th Mar 2008
Last year a member named Geoff described how to call an Excel function in
Access.
I used the SQL statment
SELECT TblQSForecast.[INVENTORY DATE], VARIETY.ITEMCODE, VARIETY.VARNAME,
"10" & [TblQSForecast]![PLOT] AS PLOT, TblQSForecast.QTY,
TblQSForecast.[STICK DATE], (GetCeiling(([TblQSForecast]![QTY]*1.1),15)) AS
STICKQTY, TblRootingIdealSeq.[Rooting Ideal Seq]
FROM TblQSForecast INNER JOIN (TblRootingIdealSeq INNER JOIN VARIETY ON
TblRootingIdealSeq.ITEMCODE = VARIETY.ITEMCODE) ON TblQSForecast.VARIETY =
VARIETY.VARNAME
WHERE (((TblQSForecast.QTY)>0) AND ((TblQSForecast.[STICK DATE])=[Stick
date?]))
ORDER BY TblRootingIdealSeq.[Rooting Ideal Seq];
After setting up the VBA module as he described. It all works and returns
the values i expected but then gives an error about making an outgoing call
while making an asynchronus call
 
Reply With Quote
 
 
 
 
Paul LeBlanc
Guest
Posts: n/a
 
      19th Mar 2008
Here's the basis of Geoff post

You can call Excel's functions from Access.

In your Access database, set a reference to Excel (in the VBA Editor, Tools
> References).


Write your own GetCeiling() function in Access that calls the Excel
function, as follows (but see caveat at end):

Public Function GetCeiling(dblArg1 As Double, dblArg2 As Double) As Double

GetCeiling = _
Excel.Application.WorksheetFunction.Ceiling(dblArg1, dblArg2)

End Function

You can then call the GetCeiling() function in Access like you would call
the Ceiling function in Excel.


"Paul LeBlanc" wrote:

> Last year a member named Geoff described how to call an Excel function in
> Access.
> I used the SQL statment
> SELECT TblQSForecast.[INVENTORY DATE], VARIETY.ITEMCODE, VARIETY.VARNAME,
> "10" & [TblQSForecast]![PLOT] AS PLOT, TblQSForecast.QTY,
> TblQSForecast.[STICK DATE], (GetCeiling(([TblQSForecast]![QTY]*1.1),15)) AS
> STICKQTY, TblRootingIdealSeq.[Rooting Ideal Seq]
> FROM TblQSForecast INNER JOIN (TblRootingIdealSeq INNER JOIN VARIETY ON
> TblRootingIdealSeq.ITEMCODE = VARIETY.ITEMCODE) ON TblQSForecast.VARIETY =
> VARIETY.VARNAME
> WHERE (((TblQSForecast.QTY)>0) AND ((TblQSForecast.[STICK DATE])=[Stick
> date?]))
> ORDER BY TblRootingIdealSeq.[Rooting Ideal Seq];
> After setting up the VBA module as he described. It all works and returns
> the values i expected but then gives an error about making an outgoing call
> while making an asynchronus call

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use function ceiling?? keys2000 Microsoft Excel Misc 4 7th Jun 2009 05:20 PM
what is the equivalent of ceiling function of excel in access? =?Utf-8?B?c2h1YmhhbQ==?= Microsoft Access Queries 2 1st Jun 2007 02:51 AM
how to use the ceiling function =?Utf-8?B?TGFycnk=?= Microsoft Excel Worksheet Functions 2 11th Apr 2007 07:34 PM
How to use ceiling function in access =?Utf-8?B?U3VyZXNo?= Microsoft Access Getting Started 1 15th Apr 2004 11:21 AM
Re: CEILING Function Brendan Reynolds Microsoft Access 0 14th Apr 2004 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 PM.