Subject Re: combobox
From Heinz Kesting <Nobody@Nowhere.com>
Date Sat, 9 Mar 2024 17:24:40 +0100
Newsgroups dbase.getting-started

Hi Charlie,

> Curious, I am trying to use a combobox which works great.  What I am trying to do is list what is in the datasource and allow the user to select a name wkich is working fine.  .  My idea is that there be a way for the user to be able to add a name if it doesn't exist in the dropdown.  I am not exactly sure how to handle this.  Possibly I need to use a different component?  I could use another entryfield that the user could type the name in if he doesn't find it but just wondering if there is a way that would be less confusing?

At first sight this appears to be simple - for this to achieve, you
would just change the "style" of the combobox from style = 2 (where the
user can only select from the list in the combobox) to style = 1. Now
the user can type into the combobox.

But then you would have to make provision to deal with new entries ...
does it have to find any matches in other tables/arrays/strings etc.,
what is done with the new entry?

And of course, the next time your combobox respectively your form is
opened, the list in the combobox is again fed from the provided
datasource. If you've missed to save the newly (user-created) entry to
the datasource of your combobox, the user will wonder where his recent
entry is gone and would have to add it each time again.

Hope this helps, kind regards, Heinz