> Let me explain the problem more precisily: We have a form called "Global Editor". It has a combobox with fields, which could be replaced with some value, whcih a user can enter in a textbox. Now there is a problem: how can I figure out, what data type value is entered? I thought about doing this in opposite way: after user selects a field from combobox, check its type and either use appropriate InputMask or Format property or AddObject(correctFieldTypeTextBox) and Remove the previous textbox. It would be a little hassle.
Nadu=ya,
I would load the combo with the field name and its data type. I would not show the data type in the combo but read it from the combo. I would then use the data type to set a beginning value to the textbox so the data type of the textbox.Value would be correct. Soemthing like this in the combo's LostFocus;
LOCAL lcType
lcType = THIS.List(This.ListIndex,2)
DO CASE
CASE lcType = "C"
This.Parent.Text1.Value = ""
CASE lcType $ "NFYI"
This.Parent.Text1.Value = 0
CASE lcType $ "DT"
This.Parent.Text1.Value = {}
CASE lcType = "L"
This.Parent.Text1.Value = .F.
...
ENDCASE