>Hello comunity
>
>I have the following code when a save a new record that found the max(number ) of my check and sum +1 only if :
>
>if lp.leno = 0 and len(alltrim(lp.u_stamppo)) = 0 and lp.u_movabert = .F.
lp.u_moveabert = .F. could also be written as
not lp.u_movabert.
Try to put the last part in parentheses, thus:
if lp.leno = 0 and len(alltrim(lp.u_stamppo)) = 0 and (lp.u_movabert = .F.)
This is because I am not sure about operator precedence (between "=" and "and"). Perhaps the entire previous part is evaluated first, and then compared to the logical value ".F.".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)