>>>I've ended up using the COUNT... function in the grids .When event and in my >custom Form.DeleteRec event. If 0 then I APPEND.
>>
>>Be careful with COUNT, it moves the record pointer. For many apps this is annoying if not dangerous...
>
>Like I said, I'm not totally happy with this approach but it's all I can come up with for now and because I'm deleting records I can't use RECCOUNT so basically I do the following:
>
>ThisForm.LockScreen=.T. prevents the visual annoyance
>mnrec=RECNO()
>COUNT......
>GOTO mnrec
>ThisForm.LockScreen=.F
>
.
>
>Thanks for all the ideas.
Colin - I didn't mention that in my original post but what I do to avoid moving the pojnter at all is as follows
lcoldalias = ALIAS()
USE polines AGAIN IN 0 ALIAS countlines
SELECT countlines
COUNT FOR countlines.idnumber = thisform.idnumber.value TO lnreccount
SELECT (lcoldalias)
USE IN countlines
IF lnreccount = 0
ENDIF
I am copying this to Erik. HTH
***************************
Bruce Gilmour
"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein