Access 2007 组合框显示来自 table 的错误结果

Access 2007 Combobox displaying wrong results from table

我有四个组合框链接到 SQL 表,然后它们链接到日志 table。

我遇到的问题是组合框显示正确的选项但只记录 ID 值。

假设我有一个名为 Location 的组合框,它有 3 个位置:

Cape Town
Dallas
London

The ComboBox is showing those 3 choices in the drop down but when the choice is logged it will only return the values 1,2 or 3 and not the cities

这是行来源:

SELECT Location.ID, Location.Location FROM Location ORDER BY Location.ID, Location.Location; 

但是当我尝试交换位置和 ID 顺序时,它会显示值,然后记录城市。

此外,这只是一个问题,因为我将 tables 链接到 SQL 时它们是本地的 tables 它工作正常。

我一定是在源查询中遗漏了某种搜索字段,谁能帮帮我

谢谢 旦

我设法解决了它,我不得不完全从等式中取出 ID,然后添加到我的行源中的额外位置列中

结果是这样的:

SELECT Location.Location, Location.Location, Location.Location FROM Location ORDER BY Location.Location;

老实说,我偶然发现了这个并且它有效。这样对我就可以了!