Combobox unexpected behavior

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I've got a strange behavior of my combobox object :
I have an Access 2000 project (ADP) with a form.
This form contains a combobox with the following value list (2 columns with
the first one hidden) :
1903;FRANCE;766;FRANCE

I've coded a messagebox to open after update of the combobox to display the
first column.
Thus, if I select the first element, it should return 1903 and if I select
the second one, it should return 766.

Yet, it always return 1903.....
I also get the error if there is something before FRANCE...

Anyway, if I write France instead of FRANCE, it works well.
It works also well if I display the first column instead of hidding it.

Any idea about this strange behavior?

My Access version : 2000 SP3 with all updates running on Win 2K SP4 with all
hotfixes.
Both products in english.
 
While I understand your frustration with this, there is a logic problem in
the setup of this situation. How would the user know which one they were
selecting if the first column was hidden since the only visible item then
would be "FRANCE"? If they can't distinguish between the selections, then it
shouldn't matter what is returned by their selection, because they can't
tell what they're selecting anyway.

What I believe is happening is that when you make the selection, the combo
box finds the first row that matches the value of the selection you made and
THEN passes the value in the bound column. I don't believe that this is
unique to an ADP, I've seen an MDB do the same thing.
 
Wayne,

Thank you for responding. Yet, I need to give you a little bit more
explanations :
First, this problem does not appear with a text different from FRANCE.
Secondly, the problem also occurs when I add a third column (that could
contain the name of a contact by example) that removes the ambiguity of a
duplicated entry.

So it could have been a problem of duplicate entry, but it is not in my case.
I don't figure out why it is working with all the words I've tryied except
those ending with FRANCE...!!!



"Wayne Morgan" a écrit :
 
Yes, the further explanation helps. You're right, this doesn't make sense if
there are more columns to remove the ambiguity. It also doesn't make sense
if this doesn't happen with other words. When that happens, there are
usually only a few things to check for.

1) Corrupted control. Try deleting the control and creating another one.

2) Coding error. Is there any code that reacts to your selection? If so,
could it be causing your problem?

3) Something weird in Localization. Sometimes something will appear (bug) in
one language or locality that doesn't appear in other versions of the
product.

4) The word or field name is a Reserved Word and this is causing confusion
in processing the value.
 
Back
Top