I have a question for any VB expert out there. I have the following module written for Access 97, however, the Run button will not activate. What needs to be done to run the program? And is the program language correct?
(Additional info - the table is named Structural 2005. The fields Amount, Units, and Formulation are used to calculate the field Active. All amounts are entered and waiting for calculation. I want this module to calculate to Active every record in one sweep - about 10,000 records.)
Option Compare Database
Option Explicit
Function DoTheUpdates()
docmd.set warnings false
DoCmd.RunSQL "update [Structural 2005] set Active = Amount * 8.35 * Formulation * 0.01 where Units= 'GAL'"
DoCmd.RunSQL "update [Structural 2005] set Active = Amount/16 * Formulation * 0.01 where Units= 'OZ'"
DoCmd.RunSQL "update [Structural 2005] set Active = Amount * Formulation * 0.01 where Units= 'LBS'"
docmd.set warnings true
End Function
Thanks for any assistance!
(Additional info - the table is named Structural 2005. The fields Amount, Units, and Formulation are used to calculate the field Active. All amounts are entered and waiting for calculation. I want this module to calculate to Active every record in one sweep - about 10,000 records.)
Option Compare Database
Option Explicit
Function DoTheUpdates()
docmd.set warnings false
DoCmd.RunSQL "update [Structural 2005] set Active = Amount * 8.35 * Formulation * 0.01 where Units= 'GAL'"
DoCmd.RunSQL "update [Structural 2005] set Active = Amount/16 * Formulation * 0.01 where Units= 'OZ'"
DoCmd.RunSQL "update [Structural 2005] set Active = Amount * Formulation * 0.01 where Units= 'LBS'"
docmd.set warnings true
End Function
Thanks for any assistance!