Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to solve this problem?
Message
 
 
À
31/10/2000 20:42:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00436556
Message ID:
00436561
Vues:
27
>hi,
>i'm usha from malaysia. I have a problem how to make validation.I've tried to use the coding but it'is does not work.The coding like this
>
>vlocation = location_code
>IF vlocation != land.location_code
>
>   DO FORM ("c:\mine\land.scx")
>ELSE
>   DO FORM ("c:\mine\error_code.scx")
>ENDIF
>RELEASE thisform
>
>but it'is still have a problem, when I insert the same location code, the error_code form not display.Any Help?Thanks

Hi Usha,

If this extract is your real code, you never will see error form. In the first line of code you assign vlocation=location_code and in the next statement you compare vlocation with land.location_code. If you use the same table in both places, you check doesn't make sense. If location_code is from different table (not land), you may try this code:
vlocation=location_code
if indexseek(vlocation, .f., 'land','location_code')
   * This code is already in table Land, display your Error form
else
  * Ok, this is a new code, let's continue...
endif
Note, IndexSeek is a new VFP 6.0 function. Which version of VFP do you use?

HTH
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform