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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

switching from a combo box to a text box...

Status
Not open for further replies.

rana

Technical User
Jul 5, 2000
20
0
0
US
On one of my forms, I have two controls that are combo boxes but I switched them to text boxes.  When they were combo boxes there were two fields: Thing_name and thing_ID but thing_Name was displayed in the control.  Now that they are text boxes only thing_ID is displayed.  Is there a way I can make it so that thing_Name is displayed but thing_ID value is also included?  does this make sense?
 
Hi,<br>&nbsp;I follow you up until this point: <br><br>&quot;but thing_Name was displayed in the control.&nbsp;&nbsp;Now that they are text boxes only thing_ID is displayed.&nbsp;&nbsp;Is there a way I can make it so that thing_Name is displayed but thing_ID value is also included?&quot;<br><br>If you were a little more clear I could help you.<br>Rob Marriott
 
When you make combo boxes you have the option of hiding the key column, which is usually the ID, and displaying another field (say a description or object name).&nbsp;&nbsp;when you choose an item from the combo box, the ID, not the description field is saved but the text of the description field is displayed.&nbsp;&nbsp;In text boxes I haven't found this option and can only get the ID displayed if I want the ID saved.&nbsp;&nbsp;However, this is extremely confusing for the user since they will not be dealing with ID's and will not know which ID matches with which description.&nbsp;&nbsp;Is there a way to make the text box hold two fields, the ID and description, but display the description?&nbsp;&nbsp;These text boxes are receiving information from another form so the user doesn't type anything in, but it would be helpful to them to see the description rather than the ID.&nbsp;&nbsp;bla...
 
A couple of thoughts:<br><br>Have you checked the Control Source property for your textbox?<br><br>Where did you change from a combo box to a textbox - on a form or on the underlying table?&nbsp;&nbsp;If on the form, you will probably find that the underlying table field still has its source set to &quot;thing_ID&quot;
 
in combo boxes you have two properties...<br>1) ControlSource : Field where the data will be stored<br>2) RowSource : Field(s) where to find the data that will be shown in combo box<br><br>as you can see i think that you had two fields in RowSource (Thing_name ,thing_ID), but the ControlSource was (thing_ID), and when you changed it to Text box (which has only a ControlSource). it still have its ControlSource(thing_ID) and there's no longer (Thing_name).<br><br>Now, if you want to display (Thing_name) again you have to change it back to Combo box cos' as you see you cant use Text box to display more than one field.<br><br>Hope this would help YOU...<br> <p>Mohamed Aly<br><a href=mailto:samara_79@hotmail.com>samara_79@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top