Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from a grid does not respect relation
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Delete from a grid does not respect relation
Divers
Thread ID:
00491172
Message ID:
00491172
Vues:
57
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	
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform