This topic is locked

Set field value before update

10/7/2009 9:28:01 AM
ASPRunnerPro General questions
D
deeg author

I have a field called Happy path that calculates values of multiple fields on a form - I want to set the status field based on the value of the calculated field.
I have tried it in the before update event and it does not work. This is the code i tried to use:
if values("CITIZEN")="1" and values("UNDERSTAND_ENG")="1" and values("RESIDENT")="1" and values("PLED_GUILTY")="0" then

values("POOL_STATUS_ID")="2"

else

values("POOL_STATUS_ID")="6"

end if
I get the following error:
Multiple-step OLE DB operation generated erros. Check each OLE DB status value, if available. no work was done.

T
terrynegrete 10/15/2009

In my experience this error is due mostly to mismatch in field types. Are your 'id' fields char fields in your db? If numeric/int then you should not use quotes.