Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to solve this problem?
Message
 
 
To
31/10/2000 20:42:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00436556
Message ID:
00436561
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform