Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is wrong with my code?
Message
 
À
03/02/2003 09:39:21
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00748355
Message ID:
00748369
Vues:
21
Hi Julie,

I don't see where you have set the ORDER of the table.

Try something like this:
m.DeleteCriteria=ALLTRIM(THISFORM.idcode.Value)+ALLTRIM THISFORM.idcode2.Value)

IF INDEXSEEK(m.DeleteCriteria, .T., 'table1', 'myIDCodeIndex')
  DELETE FOR m.DeleteCriteria IN 'table1'
  WAIT WINDOW 'Record has been deleted.'
ELSE
  WAIT WINDOW 'Record not found.'
ENDIF
>I am trying to set a form up so that the user can enter the necessary codes and then click on the delete button to delete a certain record. Needless to say, it is not working! Below is the code that I have in the click method of the delete button.
>
>SELECT table1
>SEEK ALLTRIM(THISFORM.idcode.Value)+ALLTRIM(THISFORM.idcode2.Value)
>IF FOUND()
> SELECT table1
> DELETE
> WAIT WINDOW 'Record has been deleted.'
>
> THISFORM.Refresh
>ELSE
> WAIT WINDOW Record does not exist'
>ENDIF
>SELECT table1
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!

Support the product. Buy the latest version!

Hugh Winters @ WorldData 408-512-1131
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform