Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from a grid does not respect relation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00491172
Message ID:
00491942
Vues:
15
Joe,
Since it is a part of a relation, you may have to move the record pointer in the parent. You could try a GO RECNO('ParentAlias') in ParentAlias or a SEEK ParentAlias.Key ORDER KeyIndex in ParentAlias to "move" the pointer to the same reocrd and force a re-seek in the child table.

HTH.

>Using vfp5, buffermode 5...
>
>I have child records that I delete with a command button. Several pointed
>out to me that to make the record disappear I need to move the record pointer.
>Problem is that when I issue a go top or skip -1 I get an unrelated
>record if the record I delete is the top record.
>
>Here is my code:
>
>
>select orderdet
>if not eof() then
>  if not orderdet.lscheduled then
>    if messagebox('Delete?',MB_YESNO,'Attention!')=IDYES
>      delete next 1
>       go top
>       thisform.refresh
>    endif
>  else
>    =messagebox('Cannot delete a scheduled item!',MB_OK,'Error!')
>  endif
>else
>  =messagebox('There are no items to delete!',MB_OK,'Error!')
>endif	
>
>
>
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform