Rounding up no matter what

JLAZ

Registered User.
Local time
Today, 06:44
Joined
Sep 17, 2003
Messages
24
I have a field I want to round up if there is anything past the decimal point.

How do I do this?
the decimal point is set to auto.

:confused:
 
This little function should do it for you:
Code:
Function roundup(pNum As Double) As Integer
   roundup = IIf(pNum > Int(pNum), Int(pNum) + 1, pNum)
End Function

test it from the debug window with

? roundup(15.01)
16

your text-box Control Source would be something like:

= roundup([myField])

HTH-

Bob
 
Thanks but I need some more info I don't know much about VB or SQL


Ok what module do I paste that into or what do I name the module.

The field is in a querry
:confused:
 
Put this in a Field: cell in the query grid:

Rounded Up: IIf([YourFieldName] > Int([YourFieldName]), Int([YourFieldName]) + 1, [YourFieldName])
 
Hi raskew,

I think I figured it out

I pasted that inot a module and called it Utility Functions

It works great.

Thanks.

Do you know how to pull info from a text field that has multiple lines.

I need a specific line pulled but not all records have something in that specific line.

:confused:
 
Hi Rose412,

Thanks for the reply, I'm going to try that to.
 
JLAZ-

I'm slow. Please provide a little more detail.

Bob
 
Hi raskew

Ok here is the text field I'm working with

EXAMPLE 1 :
COMMENTS: RICHARD PESCI 909-823-1224 OR 909-823-2600
10AM-???
1.5" DOORSILL
HALL

EXAMPLE 2:
COMMENTS:


FOYER

I'm going to need to pull the info from the specific lines
is there any way to do this

In case you're wondering why the info was not put in seperate fields, the info was imported from another program and that is the way it was.

:confused:
 

Users who are viewing this thread

Back
Top Bottom