Text box from combo source shows number?

fraser_lindsay

Access wannabe
Local time
Today, 06:24
Joined
Sep 7, 2005
Messages
218
Hi,

How do convert a combo box field to a text box on a form but remain showing the text value and not the numerical value?

I want my form to display two fields from combo boxes as a text box and then lock it so there is no way the user can change it and they can see that it is a fixed value.

Thanks
 
you can set the recordsource of the text box to yourcomboboxname.column(n) where n is the column of which the text is in, not the #
 
you can set the recordsource of the text box to yourcomboboxname.column(n) where n is the column of which the text is in, not the #
Remembering, of course, that the n of the column is zero based so if you want the 2nd column n would be 1 (YourComboBoxName.Column(1) for example).
 
Once again, thanks for your help guys.


I'm off to post about my next problem now...
 
Sorry, don't mean to hijack, but I'm having a similar issue but can't seem to get it resolved using the method above.

I have a form that is pulling data from a query. When I add the field to the form from the field list, it automatically creates a combo box that populates with the correct info when I view the form. Once I convert to a test box the data that populates within the text box is the IDnumber associated with the data I want to display.

I've tried the above solution, but it doesn't seem to work for me, but I could be using incorrect syntax.
 
Sorry, don't mean to hijack, but I'm having a similar issue but can't seem to get it resolved using the method above.

I have a form that is pulling data from a query. When I add the field to the form from the field list, it automatically creates a combo box that populates with the correct info when I view the form. Once I convert to a test box the data that populates within the text box is the IDnumber associated with the data I want to display.

I've tried the above solution, but it doesn't seem to work for me, but I could be using incorrect syntax.
The problem lies in that you are using lookups at TABLE level and it obscures the fact that it stores the number (properly I might add). So, you need to add the table in that has the lookup and use the description instead of the ID number (if you are just wanting to view it). For editing, you still need to use the number so a combo box would be appropriate.
 
Ahhh....The table is already a part of the query that is the data source for the form. I'll check the link you provided and see if that helps any.
 

Users who are viewing this thread

Back
Top Bottom