I created a form using one of my query as a source, inside that form is a list box which is also used the same query as a source. My problem is some of the fields inside the list box display's the ID number instead of character even though in the query, names are display instead of the ID. Here's a little summary of how I connect my tables. I have Device_list table, and within this table I have multiple columns and two of those columns named Device_type and Employee_ID which is referenced to Employee_details table and Device_type table. When I generate a query table from the Device_list table the result appear as per my desired output.
I don't know how do I tweak it on my list box so that I can display the Device Type and my Employee ID field as character instead of ID number.
答案 0 :(得分:0)
最可能引起混淆的原因是您设置了包含ID的表字段,以显示其引用的字符串值。这会继续显示查询结果,而不是列表框或组合框。
在列表框源查询中,请确保您使用的字段具有希望看到的实际字符串值,而不是具有ID号的字段。
答案 1 :(得分:0)
我更喜欢使用绑定的组合框而不是列表框。尝试创建一个查询,该查询显示要在组合框中显示的所有字段以及需要绑定的字段。您可以使用该查询(或复制SQL语句)作为组合框的ROW源。如果要将第一个字段作为绑定字段,但又不想显示该字段,则将“列数”设置为包括该字段,然后将“列宽”设置为从零开始。例如,如果要显示两个描述数据的字段(可能是表中的第二个字段和第三个字段),而绑定第一个字段(可能是数字字段),则可以将“列数”设置为3并设置“列”这样的宽度:0; .5“; 1”;)。使用查询作为行源可以过滤,排序等。