Message
From
17/10/1996 11:25:51
 
 
To
17/10/1996 11:10:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00010322
Message ID:
00010327
Views:
45
>Help... 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

Instead of directly attaching fields to the textboxes on the form, store them in
memvars. When the user enters the job_no value into the textbox, SEEK for the
value in the table. If found, move along with your logic, else - consider it as a
new job_no, and...move along with your logic :) Before issueing SEEK store
the current RECNO into a memvar in case you will need to go back to the
current record.

Hope it helps.
Some things are better be left unknown...NOT!!!
Previous
Reply
Map
View