This is the scenario:
Imagine a form with a NEW Record button and a grid, (and lots of other stuff, but lets keep it simple here).
When the New Record button is pressed the first empty cell in the first column should be activated.
I have tried the following approaches in the button click method:
THISFORM.Grid1.SETFOCUS
THISFORM.Grid1.ACTIVATECELL(1, 1)
i=2
DO WHILE NOT EMPTY(THISFORM.Grid1.Column1.Textbox1.VALUE)
> THISFORM.PAGES1.Page4._grid1.ACTIVATECELL(i,1)
> i=i+1
ENDDO
and this...
THISFORM.Grid1.SETFOCUS
THISFORM.Grid1.ACTIVATECELL(1, 1)
DO WHILE NOT EMPTY(THISFORM.Grid1.Column1.Textbox1.VALUE)
> KEYBOARD '{DNARROW}'
ENDDO
Unfortunately it seems that THISFORM.Grid1.Column1.Textbox1.VALUE always is evaluated to the value of the first row,col, and therefore the thing in fact becomes a forever loop.
What to do?
TIA and regards!
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)