conditional conversion?

G

Guest

Ok so 1kg = 2.2046lbs.

on my order form i give the end users the choice to enter the purchase price
and the sale price in either lbs or kgs.
Theres one field called PPrice and PUnit(a combo box with LB;KG)
And again for SPrice and SUnit(same combo box)
Is it possible without having to do VBA code, to tell access to do
PPrice/2.2046 if PUnit = KG and store the value in a new field called
ConvPPrice for example.

I need this because I directly use those fields into an excel spreadsheet
that does my costing information for me. But if an order has a KG PPrice and
a LB SPrice, the costing won't be accurate.

Thanks for helping!
 
C

chriske911

Ok so 1kg = 2.2046lbs.
on my order form i give the end users the choice to enter the purchase price
and the sale price in either lbs or kgs.
Theres one field called PPrice and PUnit(a combo box with LB;KG)
And again for SPrice and SUnit(same combo box)
Is it possible without having to do VBA code, to tell access to do
PPrice/2.2046 if PUnit = KG and store the value in a new field called
ConvPPrice for example.

I need this because I directly use those fields into an excel spreadsheet
that does my costing information for me. But if an order has a KG PPrice and
a LB SPrice, the costing won't be accurate.

Thanks for helping!

if you need this info in excel then I suppose you export this from
access, right?
if so, then you can do this in the query you use to export data
just add a field wherein you put a custom field CalPrice or whatever

in this field you put an IIF statement to multiply Price * 2.2046 if
punit = kg and just leave the field be if the punit is not kg

grtz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top