Textbox instead of Combobox

jzacharias

Registered User.
Local time
Yesterday, 22:27
Joined
Sep 13, 2010
Messages
137
Is it possible to use a texbox instead of a combobox to just display the field? Access automatically creates a combobox for the lookup fields, but I want to create a form to just display the data with no need to select anything.
 
That sounds as if you are using Table Level Lookups. If this is the case you might want to read this article and perhaps rethink your table structure.
 
So what would be the alternative?
 
You would use combos on Forms NOT on the table. Only the developer should ever see a table. Users always use forms.

To use a text box on a report, modify the report's RecordSource query to include a join to the lookup table. Select the lookup value rather than the ID. So if your Employee table includes a numeric departmentID but you want to show the departnemtName on the report, Join tblEmployee to tblDept on DepartmentID and select the employee information from the employee table and departmentName from the department table.
 
You would move the lookups to their own table and use that to populate your Combo Box.

Have a look at the sample posted in this thread.
 
just add a textbox control to your form and bind it to your data. the problem is that now you will see the index value of the data, rather than the lookedup value (which may be what you want)

so what you may need in your query is to link the value to the lookup table, to get at the looked up value directly - ie repeating what the lookup field does anyway!

you will find that it is very easy to do this, and you get more control than allowing access to do this for you anyway. (ie you could have a different sort order, or apply a different filter) which is all why none of us bother to establish lookups at table level.
 

Users who are viewing this thread

Back
Top Bottom