I have two tables as below

table 1
ProductID---Int
Descritption---Text

table 2
Id
FK_ProductID--Int
Category

but on the FK_ProductID I dont want my table not to display a number but the description from TBLA.

Dani AI

Generated

Great fix from and confirmed by . A couple of important clarifications and alternatives that help avoid surprises later:

The change you applied affects only how the field is presented to users; the numeric foreign key is still what is stored. For reporting or external access (ODBC, SQL views, other apps) you will usually want a query that joins the tables and returns the descriptive text alongside the related row. Example SQL (replace names with your actual table/field names):

SELECT t2.Id,
       t1.Description AS ProductDescription,
       t2.Category
FROM Table2 AS t2
INNER JOIN Table1 AS t1
  ON t2.FK_ProductID = t1.ProductID;

Best practices: prefer using forms or queries for user-facing lookups rather than embedding lookup behavior at the table-design level, because table-level lookups are purely a display convenience and can confuse other developers and tools. Always keep the bound value as the primary key (the ID) so referential integrity is preserved. Enforce relationships in the Relationships window and index the FK for performance. If the product list is large, use a searchable lookup (type-ahead or find dialog) rather than a long dropdown to keep the UI responsive.

Recommended Answers

All 2 Replies

1) Open table 2 in design view
2) Click on the FK_ProductID field
3) Click on the Lookup Tab (next to the General tab that lists the properties of the field)
4) Make sure Display Control is set to Combo Box
5) Change the row Source to table 1
6) Change Column cout to 2
7) Change Column widths to 0";1"

When you view the table in datasheet view, the field will now be a dropdown box with the second field in table 1 as its options.

1) Open table 2 in design view
2) Click on the FK_ProductID field
3) Click on the Lookup Tab (next to the General tab that lists the properties of the field)
4) Make sure Display Control is set to Combo Box
5) Change the row Source to table 1
6) Change Column cout to 2
7) Change Column widths to 0";1"

When you view the table in datasheet view, the field will now be a dropdown box with the second field in table 1 as its options.

Thanks a million

It works perfect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.