I designed a form to allow supervisors to “approve” or “reject” entries in the job journal. I added on the form some textboxes to allow quick filtering on the Job, Resource No., Person Responsible, etc. THE PROBLEM: When filtering, the results seem correct, except that they also include the selected/active record, even if it doesn’t fit in the filter conditions. [:(!] So, if I filter on ‘JOB10’, I will have all records of ‘JOB10’, plus the last active record, even if it was ‘JOB99’ ! My code on the OnValidate() Trigger is as simple as this: IF JobFilter <> ‘’ THEN SETRANGE(“Job No.”, JobFilter) ELSE SETRANGE(“Job No.”); Any idea?
Try on the OnValidate() Trigger: SETFILTER(“Job No.”, JobFilter) IF FIND(’-’) THEN; And on the OnAfterValidate() Trigger: CurrForm.UPDATE(FALSE);
wouh! It was so simple, thank you! I was trying to do the CurrForm.UPDATE(FALSE) in the OnValidate trigger instead of the OnAfterValidate [:o)]