Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Level Validation
Message
 
To
17/10/1996 11:10:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00010322
Message ID:
00010326
Views:
47
>Help. I am fairly new to VFP so I'm having trouble figuring out how to do some things. I have a table where JOB_NO is a field and primary key.
>
>On a form, when a user enters a job_no, I want it to check then whether this is a new job no.
>
>My thinking is this should be done in the Valid of the table for job_no. I just don't know how to check to see if its a unique number without moving the record pointer which causes a recursive error.
>
>I cannot generate the job_no on the form or with the default value because it is keyed from a hard copy, and I don't know what the next value will be.
>
>Any help/suggestions is greatly appreciated
>
>Phil

lcAlias = alias()
select jobno from mytable where mytable.jobno = this.value into cursor temp
if _tally > 1 && another record w/ number
=messagebox('This number already used')
endif
use in temp
select &lcAlias
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform