I was wondering if anyone could help. For years we have used DBase3 for a specific database process and are updating all dbase files to Access this year. Below is a sub-program we used for calulation and field replacement. This is DBase language - how would you write it in VBA for Access?
use Pesticide 2005 (database)
m_amt = 0
goto top
do while .t.
do case
case UNITS = "GAL"
m_amt = amount * 8.35 * formulation * 0.01
replace ACTIVE with m_amt
case UNITS = "OZ"
m_amt = amount/16 * formulation * 0.01
replace ACTIVE with m_amt
case UNITS = "LBS"
m_amt = amount * formulation * 0.01
replace ACTIVE with m_amt
endcase
skip
enddo
return
Any help is appreciated. Thanks.
use Pesticide 2005 (database)
m_amt = 0
goto top
do while .t.
do case
case UNITS = "GAL"
m_amt = amount * 8.35 * formulation * 0.01
replace ACTIVE with m_amt
case UNITS = "OZ"
m_amt = amount/16 * formulation * 0.01
replace ACTIVE with m_amt
case UNITS = "LBS"
m_amt = amount * formulation * 0.01
replace ACTIVE with m_amt
endcase
skip
enddo
return
Any help is appreciated. Thanks.