with thisform.pBar if .Value = 100 .Value = 0 else .Value = lnNewValue endif endwith * However next is more generic and safe and doesn't depend on max being 100 with thisform.pBar if .Value = .Max .Value = .Min else .Value = min(lnNewValue, .Max) endif endwithLatter is safer because when providing a new value you might pass a value greater than .Max causing an error.
select blah blah into cursor crsProcess with thisform.pBar .Max = _Tally .Value = 0 scan * Do something .Value = min(.Value+1,.Max) && Safety that might not be needed in fact endscan endwithNext event would do something similar to start it over.