Textbox instead of Combobox (1 Viewer)

jzacharias

Registered User.
Local time
Today, 15:19
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.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:19
Joined
Aug 29, 2005
Messages
8,263
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.
 

jzacharias

Registered User.
Local time
Today, 15:19
Joined
Sep 13, 2010
Messages
137
So what would be the alternative?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:19
Joined
Feb 19, 2002
Messages
43,408
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.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:19
Joined
Aug 29, 2005
Messages
8,263
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.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:19
Joined
Sep 12, 2006
Messages
15,677
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

Top Bottom