General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Usha,
You told me yesterday that the current table is 'land', OK?
When VFP executes the first instruction:
vlocation = location_code
VFP stores the field location_code from table 'land' into variable vlocation.
And now, if you take the next sentence:
IF vlocation != land.location_code
They will never be different because record pointer still is on the same record of table 'land'
That condition always returns FALSE and you will always see the error form.
Please tell me one more thing:
Which values do 'WAIT WINDOW command' show you?
I bet it always show you the same value, otherwise you are not including the whole code here.
Also, you say that you insert other record, Where are you doing it?
I will wait for details.
Juan Carlos.
>Hi,
>I was tried to use this command but it still read the first record in a table. I mean, if the data is already exist in database, error form will display when I insert the same data.
>
>But when I insert the other record (location code) except the first record,the command cannot read and the error form not display.
>
>WAIT WINDOW location_code
>vlocation = location_code
>USE ("c:\mine\land.dbf")
>WAIT WINDOW land.location_code
>IF vlocation != land.location_code
> DO FORM ("c:\mine\land.scx")
>ELSE
> DO FORM ("c:\mine\errorcode.scx")
>ENDIF
>RELEASE thisform
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only