1st line on subform is not filtered

I have a subform which uses date filters which are passed from the mainform. The first record on the subform is displayed without the filters. The other records are ok. This is V4.0 on SQL.

I use a function to pass the datefilters to the subform. This function is called from the OnOpenForm trigger of the mainform.

If I debug this what I see is that the first record for the subform is read before the function which passes the filters is executed. The other records on the subform are read after the datefilters have been passed. In other words, it seems that the first record on the subform is read before the OnOpenForm trigger on the mainform is executed.

I have tried changing the SourceTableRecord property on the subform in case this might have an effect. It didnt. Has anyone else seen this ?

The function in the subform you call, must contain a “CurrForm.UPDATE(FALSE);” as the last statement. This will fix the problem.

Thank you. That has fixed it :slight_smile: