Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locate for more than one record
Message
 
 
À
11/03/2002 20:35:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00631289
Message ID:
00631302
Vues:
25
One more.
Select table
If FindOne(Myvalue1, Myvalue2) ;
     AND FindOne(Myvalue3, Myvalue4) ;
     AND FindOne(Myvalue5, Myvalue6) 
   = Messagebox("It is successfuly!",0,"Found")
endif

Function FindOne(Val1, Val2)
Locate for fieldname1 = Val1 and fieldname2 = Val2
Return Found()

* Or 
SELECT * FROM mytable ;
  WHERE (fieldname1 = Myvalue1 and fieldname2 = Myvalue2) ;
     OR (fieldname1 = Myvalue3 and fieldname2 = Myvalue4) ;
     OR (fiedlname1 = Myvalue5 and fieldname2 = Myvalue6) ;
  TO SCREEN NOCONSOLE
If _TALLY = 3
   = Messagebox("It is successfuly!",0,"Found")
endif


>Hi,all
> I want to find the three record in one table.If they are found,the message
>box is appeared that it is successfully.
>e.g.
>Select table
>Locate for fieldname1 = Myvalue1 and fieldname2 = Myvalue2
>Locate for fieldname1 = Myvalue3 and fieldname2 = Myvalue4
>Locate for fiedlname1 = Myvalue5 and fieldname2 = Myvalue6
>If found()
> = Messagebox("It is successfuly!",0,"Found")
>endif
>??? Please tell me!!
>Thank you
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform