combobox not allowing changes (long, sorry...)

vauneen

New member
Local time
Today, 06:34
Joined
Nov 8, 2006
Messages
4
Hi,
i'm not sure if this should be posted under queries or forms...
i have a series of combo boxes in a from based on a query.
each combo box needs to display options for characteristics of each section of a motor (ie. combo box for 'Corroded' = 'slightly', 'very', 'not at all', combo box for 'dents' = 'none', 'top', etc)
my table structure works like this: i have a parent defintion tbl that defines the list of combo boxes (i.e. 'corroded', 'dent', 'rub marks') and assigns then and ParentID number that links to the tbl:InfoObjectDefinitions that defines ALL the possible characteristics ('slightly', 'very', 'not at all','none', 'top') and assigns them an ObectID number.
So in a nutshell, i can pull the possible numeric options (OID) and text values('slightly') for 'corroded' from the table InfoObjectDefinitions according to 'corroded's PID.
I then store the OID in the column for 'corroded' in tbl:Repairs.
so i need to create a form that lets people add/edit entries in the repair tbl using the text values and not the id numbers.
i can create a query for the form, that joins the repairs table and the InfoObjectDefinitions table, and substitutes the numeric values from the repairs table with the text values in InfoObjectDefinitions but then the comboboxes arent editable???? (the combobox expands, and i can see all the text values but cant select a new value)
The SQL that created my query 'repairFormTest' is:
SELECT Repairs.FENumber, Repairs.Corroded, (select otext from InfoObjectDefinitions where pid = 17 and oid = Int(Corroded)) AS CorrodedTxt
FROM Repairs;
and the form places the field CorrodedTxt as the Control Source of the combo box with 'select otext,oid from infoobjectdefinitions where pid = 17' as the Row Source.
And as i mentioned, the box lokks right, and expands correctly but i can select another value.
Any help appreciated, i really stuck.....
Thanks,
Vauneen
 
but then the comboboxes arent editable????
depends what the LimitToList property is set to.

so i need to create a form that lets people add/edit entries in the repair tbl using the text values and not the id numbers.

You save the ID number (the bound column) in the table but display the text description in the ComboBox.

Col
 
Thanks for the prompt response Colin!

I have the LimitToList property set to 'yes' because they really cant make up values because of the database structure. is that a problem?

I'm not sure i understand your second comment:
You save the ID number (the bound column) in the table but display the text description in the ComboBox.

i guess that is exactly what i need to be doing, i need to display the text values but save the id numbers to the database. do you have any idea how i can do that?

thanks, vauneen
 

Users who are viewing this thread

Back
Top Bottom