Form versus Subform

Hi, I have a problem with a subform. I created a form with a tablebox and a subform. The tablebox contains the Saleheader lines and the subform has the attached saleslines. When I scroll in my salesheader tablebox I’ll see all the attached saleslines for each SalesHeader. Works great. BUT… when I delete the SalesHeader lines, so the salesheader tablebox is empty, there are still saleslines IN the subform, and I know that all the saleslines are deleted too. I double checked that. It seems to be that the subform is not refreshing properly. And here is the issue: When I go with the cursor to the subform after I have deleted all the salesheader lines in my tablebox, it gives me an error and I got kicked out of Navision. Any suggestions? Roelof de Jong.

use currform.update after deleting saleshaeader

Doesn’t work Robi, I tried that.

what about defining a function on subform’s form: UpdateMySubForm() BEGIN currform.update(false); END; then calling this function after deleting sales header: CurrForm.MyLinesSubForm.FORM.UpdateMySubForm;

Doesn’t work either. I received a fix from Microsoft. They could repiclate the problem but didn’t know what caused the problem. They give me a fix: //Put the following code in the OnActivateForm trigger of the subform: IF WebHeader.COUNTAPPROX = 0 THEN RESET;

strange soulution to a common problem. WebHeader ?!? Looks like you haven’t told us all the spicy details… At least it’s working now…