I have a combo box issue which has caused me many hours of pain. Hopefully this will explain the issue.
My application has many linked tables. When providing the user with a data input form, I have provided 3 combo boxes, based on 3 of the tables. All work fine in the initial design and can be used to populate a 4th table via an SQL Query.
I'm now improving the usability of the form and instead of the combo boxes reverting back to the initial values in each query on which they're based, I want to be able to write a statement to them prompting the user to enter data for the next update. I've accomplished by using combo1.value = "Select pupil". This works perfectly for two of the combo's but does not display in the third. I've traced all the way back through the properties and the queries and they are effectively identical. Through trial and error I've identified the following as the course, but just don't know how to get over it.
The two combo's that work have the following datatypes in the underlying table:
field 1: Autonumber (primary)
field 2: shorttext
(in both cases, field 1 is the bound column in the combo)
The combo that doesn't work is based on a table with datatypes as:
field 1: shorttext (primary)
filed 2: shorttext
I have got it to work, by changing the field 1 datatype to longint, as they are actually all numeric. But there is a reason why I would prefer them as text.
So my question is, how do I get around this with having a text based primary key - which appears to be the root cause!
I hope this is reasonably clear
Regards
Alistair