Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COMBO Box behaviour difference 97 to 2000 1

Status
Not open for further replies.

purpleflash

Programmer
Aug 17, 2001
11
0
0
GB
Here is an odd problem that I discovered whilst migrating.

Unbound Combo box using a linked table as source.
In 97 picking a value displays the value in the field
In 2000 picking a value doesn't on initial query although the value is still there (I use the value as a default value later in the process)! If you select again after losing focus (say to a subform) the value displays.

Any ideas anyone? or is this just another MS feature!
 
Uncanny. I just ran into this baby, for the first time, yesterday. Didn't solve it necessarily, but worked around it. The key questions seemed to be:
Do you have column headers?
Are you renaming your bound-column column?
How are you setting your value?

I had headers, had to keep them, but since visible header 1 is actually ItemData(0), it seemed to cause problems. So I added a second version of that column, invisible and with no nifty caption on it ("BillNum" was the field name, the display was called "Bill"), and set my bound column to that hidden column, ItemData(0) or ItemData(whatever) and it worked every time.

Also: I learned, much to my amazement and disgust, that between a combo without headers, and one with, the ItemData() goes up by 1, the ListCount() goes up by 1, and the ListIndex... stays the same. Now, if someone can help me out on that li'l bit o' logic...

Anyway, hope one of these things gets you out of it. Took me hours.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top