Hello.
I have a form that requires the user to enter information. One of the fields on each of the records is an approval list box. The values contained are "Proposed"/"N" and "Approved"/"Y". When the user changes the list box to "Approved", I execute a function to verify the other fields. If any of the fields fail their tests, I want to set the list box back to "Proposed" and display an error.
The code is successfully identifying errors and displaying them. It is also displaying "Proposed" in the list box.
The problem I am having is that while "Proposed" is displayed, that is not the actual value of the field. The rest of the fields for the row are still disabled as they would be for "Approved" and if I save the record, it is saved as "Approved".
Here is the code I am using to set the field:
if not b_passed then
dw_entry.setitem(row,"sz_approved","N"
messagebox('Error',sz_validerror)
else
dw_entry.setitem(row,"sz_approved","Y"
end if
Is there something else I need to do to get this to work the way I need it to?
Thanks!
I have a form that requires the user to enter information. One of the fields on each of the records is an approval list box. The values contained are "Proposed"/"N" and "Approved"/"Y". When the user changes the list box to "Approved", I execute a function to verify the other fields. If any of the fields fail their tests, I want to set the list box back to "Proposed" and display an error.
The code is successfully identifying errors and displaying them. It is also displaying "Proposed" in the list box.
The problem I am having is that while "Proposed" is displayed, that is not the actual value of the field. The rest of the fields for the row are still disabled as they would be for "Approved" and if I save the record, it is saved as "Approved".
Here is the code I am using to set the field:
if not b_passed then
dw_entry.setitem(row,"sz_approved","N"
messagebox('Error',sz_validerror)
else
dw_entry.setitem(row,"sz_approved","Y"
end if
Is there something else I need to do to get this to work the way I need it to?
Thanks!