Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

can you round down in access

Posted on 2010-11-29
4
Medium Priority
?
682 Views
Last Modified: 2012-06-27
Hi Experts,

I have some calculations i'm doing based on values of other fields.  In one calculation, i need to round down to the nearest tenth.  This is my code, it rounds up.  Is there a way to do this rounding down.  I need the value to be 1.8 not 1.9

me.txtPoundsPerPieceFt.Value=Round(me.txtCutLength.Value / 12, 1)

where me.txtCutLength value = 22.625

Thanks :-)
Laura
0
Comment
Question by:linbayzak
4 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 2000 total points
ID: 34233339
me.txtPoundsPerPieceFt.Value=Int(me.txtCutLength.Value / 1.2) / 10.0
0
 
LVL 13

Expert Comment

by:Rick
ID: 34233347
Use truncate instead of round
0
 

Author Closing Comment

by:linbayzak
ID: 34233377
thank you, works perfectly....now it didn't maintain my 10.0 on the end, just the 10, is that ok?  it did get the right number.  also, access didn't allow truncate to be used, sorry.  thanks again :-)

laura
0
 
LVL 10

Expert Comment

by:VTKegan
ID: 34233387
There are two good functions for this available in Excel.  You can use them by going to Tools -> References and add Microsoft Excel 12.0 Object Library and add these two functions to a module for your use.

Function RoundUp(arg1 As Double, arg2 As Double) As Double

RoundUp = Excel.WorksheetFunction.RoundUp(arg1, arg2)

End Function


Function RoundDown(arg1 As Double, arg2 As Double) As Double

RoundDown = Excel.WorksheetFunction.RoundDown(arg1, arg2)

End Function

Using RoundDown will give you exactly what you need.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question