Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re: use of seek command
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: use of seek command
Divers
Thread ID:
00749086
Message ID:
00749086
Vues:
73
I am getting a program error "uniqueness of index is violated"

I am using a simple form with two text boxes, text1 control source is
variable mhlotno, numerical, format 666666

Lotno is a table, with one field,named lotno, numerical,width of 6 and with a candidate cdx index named lotno

here is my script:

under gotfocus procedure for text1
mhlotno=0

under lostfocus procedusre for text1
SELECT lotno
SET ORDER to lotno

SEEK mhlotno
IF FOUND()
MESSAGEBOX("This Lotno already exists",0,-1,"New Lot Entry")
thisform.text2.SETfocus

ELSE
MESSAGEBOX("Woo Hoo New Lot made",0,-1,"New Lot Entry")
APPEND BLANK
replace lotno WITH mhlotno
thisform.text2.SETfocus
ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform