ThisForm.oleProgressBar.Min = 0 ThisForm.oleProgressBar.Max = 100 select count(*) from customers into cursor test ; where ThisForm.UpdateProgress(recno(), reccount())Create a method on the form called UpdateProgress.
LPARAMETERS tnRecno, tnReccount LOCAL lnPercentage lnPercentage = int(tnRecno * 100 / tnReccount) ThisForm.oleProgressBar.Value = lnPercentage