[VBFORM 6.1] - Selecting the largest number amongst Number01 and add

Hi everyone, I have a requirement where I need to create an automatic running number in VBForm in Vantage, the way I see it, I need to select MAX from InvcHead, then add 1 to it and assign the new number into the VBForm.

I believe this can be done with Progress programs, but I'm a bit lost on this for the moment.

Will appreciate if anyone can show me some pointers.

Thank you!