Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Txtbtns, dataenvironment..
Message
 
À
29/11/1999 22:08:10
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00296680
Message ID:
00297193
Vues:
19
Frank,
First, be sure your table is buffered. (I think this is the default when you're using the form builder, but check anyway) Next, in your Valid() code, use a SELECT of the base table looking for the SSN. A SELECT statement will look at the NON-buffered version of the table, so it won't see the record you have just added.
cSSN = this.value

SELECT ssn from MyTable ;
WHERE ssn = cSSN ;
INTO cursor MyTemp

IF _tally > 0
   ** It found a record
   ** Tell them it's a duplicate
   =messagebox("Hey, Stupid, you entered that one before!", 16, "Duplicates")
   lRet = .f.
ELSE
   ** Just go on
   lRet =  .t.
ENDIF
USE in MyTemp
return lRet
HTH
Barbara

>to all,
>i have a form that was built using the form builder. i selected a table to use and it uses the txtbtns for record manipulation. the table i am using is a .dbf not .dbc file. anyhow if i am adding a record and have a valid event behind a textbox(one of the fields from the database file), and it does not meet the valid event criteria, i want to be able disregard the transaction. what is best way to do this.
>
>for example if i have a ss# that does not match a ss# that is in the master table i do not want this record added. i want to put something the valid event of ss# textbox to automatically go back to the textbtns with everyting enabled, not just save and revert.
>help.
>thanks
>frank
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform