dbTalk Databases Forums  

Expression in numerical fields

comp.databases.ms-access comp.databases.ms-access


Discuss Expression in numerical fields in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bobdydd
 
Posts: n/a

Default Expression in numerical fields - 10-19-2010 , 11:22 AM






Hi

Access 2007

I have 2 fixed numerical fields that I used in an
expresssion to add together:

=txtPostage1_IncVAT + txtBuyerItemCost_IncVAT
9.40 + 209.99 = 219.39

What I would like is to be able alter the whole
part of the field i.e. the 219, to 218.99 and discard
the .39 part

Best regards
Bob

Reply With Quote
  #2  
Old   
John W. Vinson
 
Posts: n/a

Default Re: Expression in numerical fields - 10-19-2010 , 11:52 AM






On Tue, 19 Oct 2010 09:22:46 -0700 (PDT), bobdydd
<reallyuseful2004 (AT) yahoo (DOT) co.uk> wrote:

Quote:
Hi

Access 2007

I have 2 fixed numerical fields that I used in an
expresssion to add together:

=txtPostage1_IncVAT + txtBuyerItemCost_IncVAT
9.40 + 209.99 = 219.39

What I would like is to be able alter the whole
part of the field i.e. the 219, to 218.99 and discard
the .39 part

Best regards
Bob
So you want to take a correct and legal mathematical expression and return an
incorrect and probably illegal result?????

What's the rationale? And what business rule do you want to apply - 0.01 less
than the next lower whole number, or what?
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com

Reply With Quote
  #3  
Old   
Bob Barrows
 
Posts: n/a

Default Re: Expression in numerical fields - 10-19-2010 , 12:30 PM



bobdydd wrote:
Quote:
Hi

Access 2007

I have 2 fixed numerical fields that I used in an
expresssion to add together:

=txtPostage1_IncVAT + txtBuyerItemCost_IncVAT
9.40 + 209.99 = 219.39

What I would like is to be able alter the whole
part of the field i.e. the 219, to 218.99 and discard
the .39 part

I'm as baffled as John, but here's my guess anyways. It might give you the
clue enable you to get what you really want:

=Int(txtPostage1_IncVAT + txtBuyerItemCost_IncVAT) - .01

Reply With Quote
  #4  
Old   
bobdydd
 
Posts: n/a

Default Re: Expression in numerical fields - 10-19-2010 , 01:18 PM



Thanks for the answer. It works Ok

It is being used to enter prices including postage on eBay
and finish the price with a .99

It's a sales thing

Thanks guys

Reply With Quote
  #5  
Old   
croy
 
Posts: n/a

Default Re: Expression in numerical fields - 10-20-2010 , 10:48 AM



On Tue, 19 Oct 2010 11:18:24 -0700 (PDT), bobdydd
<reallyuseful2004 (AT) yahoo (DOT) co.uk> wrote:

Quote:
Thanks for the answer. It works Ok

It is being used to enter prices including postage on eBay
and finish the price with a .99

It's a sales thing

Oh gawd... Where'd I put the prozac and the antacid?

--
croy

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.