Undoing user update of a field
I have two bits of code that are used for different subforms on the same form. The idea behind the code is to prevent the user from changing a field on a locked row (invoiced). The first code snippet works fine, the second gives an error. Does anyone know why that would be?
- if(row.Locked)
- {
- cd = PrintCustomisations[ID == row.ID];
- if(cd.Height1 != row.Height1)
- {
- row.Height1=cd.Height1;
- }
- return;
- }
vs
- if(row.Invoiced)
- {
- info row.ID;
- pp = PrintPublication[ID == Row.ID];
- if(pp.Classification != row.Classification)
- {
- row.Classification=pp.Classification;
- }
- return;
- }
Error