Results 1 to 4 of 4
  1. #1
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121

    Ceilling function in access

    I know there is ceiling function in SQL but is there any similar function in Access.



    I have value 25.2 it should be rounded as 26 in my query.

    if use round (25.2) it will show me 25

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    no, but you can use

    round(25.2+0.5)

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    But you can apparently use an Excel function if you have a reference to Excel. To use it in a query, wrap the worksheet function in an Access UDF
    Code:
    Public Function fCeiling(vDblValue As Var, vSignificance As Var) As Double
    fCeiling = Excel.WorksheetFunction(vDblValue, vSignificance)
    End Function
    I wish I could say I thought of it myself...
    https://access-programmers.co.uk/for...d.php?t=159228
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121
    Quote Originally Posted by Ajax View Post
    no, but you can use

    round(25.2+0.5)
    But I have different numbers in my field. If it 25.9+0.5 it will give me 26 - That is good. Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-26-2017, 11:31 AM
  2. Access IIf function help
    By drz in forum Access
    Replies: 1
    Last Post: 11-04-2016, 01:29 PM
  3. access qry to vba function
    By slimjen in forum Modules
    Replies: 7
    Last Post: 06-26-2014, 10:03 PM
  4. Using the Nz function (Access 07)
    By jonny3000 in forum Access
    Replies: 5
    Last Post: 11-15-2012, 12:46 PM
  5. Help with Access - IIf Function
    By cs93 in forum Programming
    Replies: 7
    Last Post: 03-19-2011, 11:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums