Hello,
I have the following program. When I go to run it, a box pops up asking me for a parameter value for 1%formulation. The column has numbers in it, however. Why am I getting that message?
Also, while 1%Formulation always has a number present in its dbase column, 2%,3%,4%Formulation are sometimes Null even though the column is set for a default value of 0. If nulls will throw the program out of wack, how do I compensate for that in the program?
Thanks for any advice.
Function DoChemConversions()
Const table As String = "[tbl Structural 2005]"
DoCmd.RunSQL "update " & table & " set [Active1] = [Active] * [1%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active2] = [Active] * [2%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active3] = [Active] * [3%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active4] = [Active] * [4%Formulation] * 0.01"
End Function
I have the following program. When I go to run it, a box pops up asking me for a parameter value for 1%formulation. The column has numbers in it, however. Why am I getting that message?
Also, while 1%Formulation always has a number present in its dbase column, 2%,3%,4%Formulation are sometimes Null even though the column is set for a default value of 0. If nulls will throw the program out of wack, how do I compensate for that in the program?
Thanks for any advice.
Function DoChemConversions()
Const table As String = "[tbl Structural 2005]"
DoCmd.RunSQL "update " & table & " set [Active1] = [Active] * [1%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active2] = [Active] * [2%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active3] = [Active] * [3%Formulation] * 0.01"
DoCmd.RunSQL "update " & table & " set [Active4] = [Active] * [4%Formulation] * 0.01"
End Function