View Full Version : formula for table fields


wayliff
04-23-2007, 11:51 AM
I have two fields on a table that has numeric values.

I'd like to create a third field where i would just like to divide the two numbers, multiply by 100 and display the results on field three.

I can't use forms or reports as i need to be able to export this information to excel.

Can this be done?

rainman89
04-23-2007, 11:53 AM
yes but dont do it in a table! make a query instead

boblarson
04-23-2007, 11:54 AM
You should not store the data. You can create a field within a query that you can export to Excel:

MyNewFieldName:[YourFirstField]/[YourSecondField]

wayliff
04-23-2007, 11:55 AM
i'll give that a shot - thanks

rainman89
04-23-2007, 11:55 AM
You should not store the data. You can create a field within a query that you can export to Excel:

MyNewFieldName:[YourFirstField]/[YourSecondField]

Little more on boBs.... you forgot the * 100

MyNewFieldName:([YourFirstField]/[YourSecondField])*100

wayliff
04-23-2007, 11:58 AM
now where in the query design view would this expression be entered...
I have worked with access doing other things but not precisely doing this...feel kind of stupid.

rainman89
04-23-2007, 11:59 AM
add the two fields to the query design.. then in the third column add

MyNewFieldName: ([YourFirstField]/[YourSecondField])*100

then change the names of the fields in the above entry

wayliff
04-23-2007, 11:59 AM
ok - thanks for both your help...did it

boblarson
04-23-2007, 12:01 PM
Little more on boBs.... you forgot the * 100

MyNewFieldName:([YourFirstField]/[YourSecondField])*100


Picky, picky, picky :D ;) :cool:

rainman89
04-23-2007, 12:03 PM
Picky, picky, picky :D ;) :cool:

haha you know it...'


Glad to help