DBLoopupControl
Hi,
I want to use the control DBLookupControl in my Report.
The functionality is OK, and it fulfills my requirements.
But if the user don't select one valid value in the fields:
ListField the program show the error message. "Ung??ltige Variant-Typumwandlung"-"(Not valide Typ-carsting)".
My problem:
At program start the listbox for ListField is empty and I don't know, how can I set a special default value to avoid this error.
thanks for help
regards David
I want to use the control DBLookupControl in my Report.
The functionality is OK, and it fulfills my requirements.
But if the user don't select one valid value in the fields:
ListField the program show the error message. "Ung??ltige Variant-Typumwandlung"-"(Not valide Typ-carsting)".
My problem:
At program start the listbox for ListField is empty and I don't know, how can I set a special default value to avoid this error.
thanks for help
regards David
Comments
Does it mean 'Invalid variant type conversion'? Well the basic problem is the standard DbLookupCombobox doesn't have a simple meaningless default value and also doesn't have the ability to synchronize itself with the underlying dataset. So if You locate a value in the underlying dataset the combo won't show the field value of that record. I use Dimitry V. Bolshakov's Ehlib that contains the TDbLookupComboboxEh component that has a property DropdownBox.SpecRow. This define a special row that the user can select and this is the default row in the dropdown list. It also has the property KeyValue. If You set this to a PK and call LocateKey the combo will synchronize itself with the dataset. Now the problem is that FR doesn't have similar component. I wrote an FR dialog control based on TDbLookupComboboxEh, it works but it is not perfect yet. In some cases it crashes the designer. Send me your e-mail and when it will works perfectly I will send You. But remember, You must have the Ehlib (www.ehlib.com).
Regards:Alex