🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.ms-access
Article #431

Re: Rounding-down & IFs?

#431
From: Nigel King
Date: Thu, 27 Nov 1997 00:00
58 lines
2669 bytes
Alan-

Function TruncAU (value)
'this function will truncate to 2 decimal places the underlying value in
a currency field
'it is designed to operate as an AfterUpdate property

value = Int(value * 100) / 100

End Function

It is a routine I obtained from another Access developer. I am not too
conversant with modules but presume that modifying this to read:

value = Int(value) will truncate.

I have other routines that I use for Rounding. Let me know if these
might be helpful.

Ref your If in a query-

Where are you trying to use this? As an update result for example or in
the criteria? Give me some pointers and I might be able to help you, I
have used a number of these.

Email me - Nigel@landaur.demon.co.uk

Look forward to hearing fro you.
Regards.

In article <880515983.593058@comcen.comcen.com.au>, Alan Steele
<asteele@welpac.com.au> writes
>Hey,
>I'm in the process of inserting the Luhn algorithm (for basic credit card
>checking) into an existing database but I'm having some problems removing
>the decimal places after performing one of the calculations.
>
>
>I've tried formatting to "0" and using "0" decimal places, both of which
>round the number up.
>
>
>I am using the design view for the query but wouldn't be opposed to using
>SQL if someone should volunteer some SQL info.
>
>
>The other question I have is on how to use "If" statements within a query?
>Any help would be much appreciated. Thanks in advance,
>Alan Steele, Systems Admin.
>asteele@welpac.com.au
>
>
>

-- 
Nigel King
Landaur Ltd    computing@landaur.demon.co.uk
Technical Details
Message-ID: <lcSv9HALEcf0EwVK@landaur.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <880515983.593058@comcen.comcen.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111a5a,9851c8d9c939c74c
X-Google-Attributes: gid111a5a,public
X-Google-Thread: ff0ac,9851c8d9c939c74c
X-Google-Attributes: gidff0ac,public
X-Google-Thread: 102b1d,9851c8d9c939c74c
X-Google-Attributes: gid102b1d,public
X-Google-Thread: 10bb27,9851c8d9c939c74c
X-Google-Attributes: gid10bb27,public
X-Google-Thread: f8db2,9851c8d9c939c74c
X-Google-Attributes: gidf8db2,public
X-Google-Thread: 1143dd,9851c8d9c939c74c
X-Google-Attributes: gid1143dd,public
From: Nigel King <Nigel@landaur.demon.co.uk>
Subject: Re: Rounding-down & IFs?
Date: 1997/11/27
Message-ID: <lcSv9HALEcf0EwVK@landaur.demon.co.uk>
X-Deja-AN: 293209013
Distribution: world
X-NNTP-Posting-Host: landaur.demon.co.uk [158.152.173.58]
References: <880515983.593058@comcen.comcen.com.au>
Reply-To: Nigel King <nigel@landaur.demon.co.uk>
Newsgroups: comp.databases.ms-access,de.comp.datenbanken.ms-access,es.comp.bd.ms-access,it.comp.database.access,microsoft.public.access.chat,microsoft.public.access.queries