Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid clause with row source
Message
De
20/07/1999 09:46:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/07/1999 09:28:36
Tim Yoder
Pin Point Computer Systems, Inc.
Bedford Heights, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00243547
Message ID:
00243565
Vues:
28
>I have a combo box that has a row source type of fields and the row source is the field name in the database. The database has codes that I want them to pick from. I put in the valid clause:
>
>if this.value != dbf.field
> return .f.
>else
> return .t.
>endif
>
>this works fine when I want them to only pick from the database. The problem is sometimes I want to let them put in a blank and still do the validation. So, I tried:
>
>if !empty(this.value) AND this.value != dbf.field
> return .f.
>else
> return .t.
>endif
>
>the problem is that if you put in a blank or an invalid code this.value is empty. How do I know if they left the field blank or put in an invalid code?

What about making the rowsource an SQL and style dropdown list ?
Rowsource = [select distinct myField from mytable ]+;
[ union ]+;
[select " " as myField from myTable ]+;
[into cursor mycursor]
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform