473,666 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Roundup formula use in Access with help round formala

2 New Member
I am on a elementary level of MS Access skill.
I am trying to create an expression, where I want to round up the value in a field.
Expand|Select|Wrap|Line Numbers
  1. Expr1: ROUNDUP(Data![Duration]/60,0)
When executing the qry, I get :
"Undefined function "ROUNDUP" in expression, I am using Access 2000. What am I doing wrong, or Is there another way ?
After that we have use below formula but it not completely correct
Expand|Select|Wrap|Line Numbers
  1. IF((Data![Duration]/60)-INT(Data![Duration]/60)<0,(ROUND(Data![Duration]/60,0)+1),(Data![Duration]/60))
Pls help me for correct for below formala
Sep 17 '13 #1
2 5165
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi You are very close to being correct. The function you need is called ROUND, not ROUNDUP, and the IF function in Access is IIF (referred to as an in-line IF):

Expand|Select|Wrap|Line Numbers
  1. YourField = ROUND(Data![Duration]/60,0)
  2. IIF((Data![Duration]/60)-INT(Data![Duration]/60)<0,(ROUND(Data![Duration]/60,0)+1),(Data![Duration]/60))
By the way, the INT function does not round up - it just gives you the integer part of a number. Looking at your IIF statement I think it will always take the second branch, as the test you are applying will never result in a negative number. For example, if [Data Duration] / 60 = 1.9, the INT of that value will be 1, and the value tested by the IIF will be 1.9 - 1 = 0.9 which is non-negative, so the second branch of the IIF will be taken.

-Stewart
Sep 17 '13 #2
Sudarshan1
2 New Member
Thanks Stewart

We have use below formula in Excel "=roundup(Durat ion/60,0)"
we want same formula in Access ...But Access not suport "Roundup" Function...Then we have use Round function...
We have use below : "ROUND((Duratio n/60)+0.49,0)"
Sep 17 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1522
by: A.P. Madura | last post by:
Need help in debugging this problem. I have an access database which I use to demonstrate Java - ODBC connectivity and it works perfectly fine. This allows me to assume that the Data Source name definition is OK. I tried to access the same DSN (system DSN) thro' PHP and the following error is displayed. Warning: odbc_connect() : SQL error:
4
2003
by: Phoon Chee Keong | last post by:
Is that a formula in vb.net like Ms Excel? Currently my Excel formula is "=(((ROUNDUP(I30/3000,0)+1)*G30)/1000)+((ROUNDUP(G30/10000,0))*I30/1000)", but in vb.net how to write. Any idea? Regards, PCK
9
2211
by: Wayne | last post by:
I have used this old compiler since 1997, but for the last year or two, I can no longer access any of its Help info (like function definitions, etc). Attempts to do so now just says "the page cannot be displayed". The little toolbar window implies its search path is, for example: mk:@ivt:vbscript/D1/8.htm (or various files, maybe mk:@ivt:vccore/F3F/F43/D4C/S4CF2D.HTM ) I cannot make any sense of that, and dont know what I am lacking....
1
1764
by: mbeddedsoft | last post by:
I'm trying to use access as the database for a website. I don't expect too much traffic initially and I didn't want to bother with a more robust/complex db. Anyway, I have this 2 tables: Cart{ cartId == userSessionId subTotal == totalCost of all items in cart item == (1 or more Items) }
3
7442
by: news.giganews.com | last post by:
Does anyone know if there's an easy way to export or copy the relationship structure from one mdb to a new one? The relationships in the db are time consuming to reproduce. I am trying to make a copy of a database including all the relationships, forms, queries and modules while still within the original database. This has to be a relatively automated process (button click). Any suggestions?
1
1840
by: Dave Martin | last post by:
I am working on a project that is giving me trouble. It has to be done quickly. It is being written in C# and I am totally new to C#. I need to update an MS Access database application that was created by a third party developer that is no longer in business. In other words there is no one there I can turn to for help. My first set of code gave me every indication of having
0
1808
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main report. The sub report is called in the report header of the main report and the formula fields are in the details section of the reports. Main report looks something like this.
2
1022
by: Don I | last post by:
Microsoft Visual Basic .NET 55501-640-5372443-18381 I'm trying to access the program's help files but all I get is "Page can not be displayed". Any idea what's up? Thx. Don I
4
2045
by: DyingIsis | last post by:
Hello - I'm a relatively new user of Access. None the less, I have a function within Excel that I would like to recreate in Access. The function called (Check if part of a cell matches specific text) in Excel is below: =IF(ISNUMBER(SEARCH("v",A2)),"OK", "Not OK") I have been trying to replicate it in Access with little luck.
2
1353
risk32
by: risk32 | last post by:
OK. So I have NO idea what I'm doing. I've only worked with Excel VBA, JS, and HTML. No clue how to use access since it's different (except maybe the VB portion of Excel VBA). I'm trying to make a login form with the standard txtUser txtPassword lblUser lbl Password, a reset button a cancel button and a login button. This part, pretty easy, Now, need the Visual Basic portion of it to reflect the Access portion of it. I honestly have no...
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.