>Hilmar
>
>Thanks for your code :)
>
>But I wanted it in dataenvironment because I would like to create objects from it,
>as combos, listboxes, etc
I think that it should be possible in the DataEnvironment, but I don't remember which is the correct event. But as Nadya said, Form.Load() is appropriate. It is important to know the order in which events are invoked, especially the following:
Form.Load()
Init() for objects contained on the form
Form.Init()
This means that Form.Load() is the correct place to prepare data that will be used on TextBoxes, etc. On the other hand, in Form.Init() you might conditionally enable/disable controls on the form - because these controls already exist. In Form.Load(), they don't.
Form.Init() is also the method that accepts parameters.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)