hi
I have problem ... In the OnOpenForm() trigger is needed to delete the active record (Rec). I have done it with DELETE command but on trigger exit it runs error message (There's no such record in the table TTT) and closes the form. However record is deleted from table and on next start of the form everything is ok.
So where's the problem? I tried to use CurrForm.UPDATE after DELETE but nothing changed.
Regards,
Arturs Gedvillo
CTO
0
Comments
Haven't tried it though..
"I tried filtering life, but the universe returned an Internal Error"
IF FIND('-') THEN;
I guess it helps, but I doubt it works if it doesn't find any record.
But doesn't that help for the typical use?
What about putting this code in the OnFindRecord trigger:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
IF NOT FIND(Which) THEN
EXIT(FALSE);
WHILE ShouldBeDeleted THEN BEGIN
DELETE;
IF NOT FIND(Which) THEN
EXIT(FALSE);
END;
EXIT(TRUE); </pre><hr /></blockquote><font size="2" face="Verdana, Arial">100% untested, but I hope you see the picture :-)
The OnNextRecord should maybe also be "wrapped", but it's a bit more tricky. Try that one yourself :-)
<small>[ 07-06-2002, 11:02: Message edited by: pdj ]</small>
Peter