G
Guest
How do I go about changing the value of a field on a form based on a
selection in a combo box and some sql stuff.
The following query will produce the correct value, I did that as a stand
alone query, but I don't know how to make the text box that value. The
following is in the after update of a combo box. There are values hard coded
in here that will be variables in the final, but work for now. I am trying
to put the sum into text12, but am missing something. The text16.value
statement is simply another test, trying to come up with something.
dim ssql as string
ssql = "SELECT Sum([tblEVENT_LOG].[intRISK_SCORE]) AS SumOfintRISK_SCORE " _
& "FROM tblEVENT_LOG " _
& "WHERE ((([tblEVENT_LOG]![txtIMPACT_YEAR] &
[tblEVENT_LOG]![txtIMPACT_QTR])<'20051') And
(([tblEVENT_LOG].[txtAUDIT_ENTITY])='1'))"
'Text12.Value = ssql
Text16.Value = sumofintrisk_score
selection in a combo box and some sql stuff.
The following query will produce the correct value, I did that as a stand
alone query, but I don't know how to make the text box that value. The
following is in the after update of a combo box. There are values hard coded
in here that will be variables in the final, but work for now. I am trying
to put the sum into text12, but am missing something. The text16.value
statement is simply another test, trying to come up with something.
dim ssql as string
ssql = "SELECT Sum([tblEVENT_LOG].[intRISK_SCORE]) AS SumOfintRISK_SCORE " _
& "FROM tblEVENT_LOG " _
& "WHERE ((([tblEVENT_LOG]![txtIMPACT_YEAR] &
[tblEVENT_LOG]![txtIMPACT_QTR])<'20051') And
(([tblEVENT_LOG].[txtAUDIT_ENTITY])='1'))"
'Text12.Value = ssql
Text16.Value = sumofintrisk_score