0
votes

I'm supporting an Access application that's about 10 years old, and I'm trying to fix some weird behavior.

There is a form with a combo box on it and for some items in the list, but not all, after I select the item, the listindex property reverts to the originally selected item.

For example, if the listindex starts at 6, and I change it to item 35, it stays 35 throughout the click event, then reverts to 6 when the focus returns to the control. If I change it to listindex 7, it sticks with 7 without reverting to 6.

Any idea what's going on?

I know the NotInList and Undo events are not firing.

Thanks for any help, including debugging approaches.

-Beth

OK, It's a 3 column list and the value in the first column (org_number, width = 0) is not unique, so it's jumping back to the first row with the same org_number value instead of staying on the row with the org_number description they selected in the 2nd column.

Any ideas how I can get it to stick?

Looks like an org_code can have multiple descriptions, which is what they want to select, but the export they're doing uses the org_code instead of the org_code and description, so their results won't match the nice count I've added to their list.

guess I'm taking that count back out...

1
If you have the solution, perhaps you can post it as an answer and accept your own answer in a little while?Fionnuala
I don't have a solution, unfortunately. Just hope the customer doesn't complain. There's probably a requirement mismatch, in that they want to select a description but report all the descriptions with the same org_code.Beth
Sounds like a bad design error. What's the outcome the users want? Seems to me that you'll have to change both the data storage and the UI to fix that.David-W-Fenton
believe me, there's plenty of 'bad' design. On the Access side, I can fix it. On the SQL Server side, not so much.Beth

1 Answers

0
votes

Can you not use the description as 'bound column' so it doesn't switch back to the another row. And then when you need the org_number, you do a lookup on the same data as in the listbox. It's a workaround, but seems to me it should work.