A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Formula (stones and pounds to kg's)



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:37 PM posted to microsoft.public.access
Karren Lorr
external usenet poster
 
Posts: 19
Default Query Formula (stones and pounds to kg's)

I have a table with 2 weight fields, stones and pounds.
Is there a formula that I could use to convert this into a single kg field.

I would be doing this in a query

There are many answers on google but they seem all to be for excel.

Thank you
  #2  
Old June 2nd, 2010, 01:44 AM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Query Formula (stones and pounds to kg's)

On Thu, 27 May 2010 14:37:55 -0700, Karren Lorr
wrote:

I have a table with 2 weight fields, stones and pounds.
Is there a formula that I could use to convert this into a single kg field.

I would be doing this in a query

There are many answers on google but they seem all to be for excel.

Thank you


Do you want all three fields? That would be bad design, since they're
redundant (three ways of depicting the same fact). Does each record have only
one of stones or pounds filled in? If both, what would you do if you had
numbers that don't agree?

A table should not have any calculated fields in it; you can run an update
query to update the kg field to the correct value, on a one time only basis:
create a query based on the table, change it to an Update query, and update kg
to

IIF(Not IsNull([pounds]), 2.2*[pounds], IIF(Not IsNull([stones]),
6.35*[stones], Null))
--

John W. Vinson [MVP]
 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.