>>Hi,
>>
>>A ComboBox lists entries from a related table ("Clients" in this case). In a different form, a new client is added. The new client should be selected in the first form. I managed to get the correct client selected - but it doesn't display correctly, until I exit the form and run it again. The ComboBox somehow isn't aware of the new record.
>>
>>The ComboBox properties are:
>>RowSource = "Client.Name, City, ..."
>>RowSourceType = 6 - Fields
>>
>>How can I force the ComboBox to refresh? Should I use a query instead of a list of fields instead; or what would the best strategy be?
>>
>>TIA,
>>
>>Hilmar.
>
>I always prefer to use a cursor for the RowSource and in this situation rebuild it and then requery the combo (unbind it and bind again).
>
>For your case you may just try to requery the combo, it may be enough.
Hi,
Just doing a Requery() is apparently not enough. Can you elaborate on some details? Specifically:
What would you use for the ComboBox.RowSource and ComboBox.RowSourceType?
What do you mean with "unbind and bind it again" - does this refer to blanking properties RowSource and RowSourceType?
Do I understand that I just load the cursor in Form.Init(), and then re-load when I add a new client in the other form?
Thanks,
Hilmar.
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)