Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Type Mismatch - ComboBox
Message
De
04/05/1998 13:09:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00096648
Message ID:
00096767
Vues:
20
>>>I have a combo box set up as a listbox which is tied to a date field in a table (vitals). I am opening the table and setting the index to date (descending order) and then I am filtering the table in the init event to the dates related to a particular patient id (this is a child table for vital signs which are taken at different dates for different patients)
>>>
>>>When I run the form, I get the following error:
>>>
>>>"Error with cmbVitalsDate - Value: Data type mismatch."
>>>
>>>Any idea why? BTW, I do not have anything in the value property and when I init the combobox, I attempt to load the first date value in the combobox so that it instantiates with the most recent date for the patient displayed.
>>>
>>>TIA,
>>>
>>>Bill
>>Bill,
>>Combo elements have char type. How do you set it init - with dtoc() ?
>>Cetin
>
>I tried to have it display its initial value as dtoc(vitals.date) in the init event. The control source is vitals.date with no initial value in the property.
>I still get this message.
>
>Is that what you mean?
Do you put directly to .value property ? and controlsource = "vitals.date" which is date type ? If rowsourcetype is set to fields than just seek() corresponding date, if not then put something like this in init :
for ix=1 to this.listcount
	if this.list(ix,2) = dtoc(yourdatevaluehere)
	  this.listindex = ix
	  exit
	endif
endfor
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
Répondre
Fil
Voir

Click here to load this message in the networking platform