Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo List and Logicals?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00691371
Message ID:
00691381
Vues:
12
>Hi all,
>
>Is it possible to have a ComboList that just has 2 items in it ie
>Installation,.T.,De-Installation,.F.
>But returns and is BoundTo a Logical field?
>
>I keep getting the error
>Error with <fieldname> - Value: Data type mismatch
>Unbinding object <fieldname>
>
>Does any one know of a way around this?
>
>Thanks in anticipation.

Hi Caroline,

It's my hunch that your method won't work in this case.
I'd go for another method. Declare two texts in the init() of the listbox. Declare the value 1 or 2 in the refresh() based on the value of the logical field of the current record. Replace the field in the record if the user changes the item in the listbox.
RowSourceType = 1   && Value

Init: 
	this.additem( 'Installation' )
	this.additem( 'De-Installation' )
	this.refresh()

Refresh:
	this.value = iif( <logical_field>, 1, 2 )

Valid:
	replace <logical_field> with ( this.value = 1 )
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform