组合框选择给出了错误的记录 - 奇怪 [英] Combo box selection gives wrong record - strange

查看:60
本文介绍了组合框选择给出了错误的记录 - 奇怪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,如果有人可以了解在组合框中选择姓氏并且该名称由多个人共享的事实,为什么访问会在列表中显示第一条记录名。 (即当选择''zach smith''时,''和史密斯'的记录将被显示出来。我认为当姓氏相同而不能解释为什么它总是显示时,它会按名字排序当在该组中选择另一个人时,第一个人在同一个姓氏的组中的记录。任何想法?

Hello, if anyone out there can shed light on the fact that when a last name is selected in a combo box, and that name is shared by more than one person, why access is displaying the first record in the list of like names. (i.e. when choosing ''zach smith'' , ''andy smith''s record will be shown. I assume that it''s sorting by first names when last names are the same that doesn''t explain why it always shows the record of the first person amoung a group with the same last name when another person is selected within that group. any ideas?

推荐答案


你好,如果那里的任何人都可以了解当在组合框中选择姓氏并且该名称由多个人共享时,为什么访问显示列表中的第一条记录同样的名字。(即当选择''zach smith''时,''和史密斯'的记录将被显示出来。我认为当姓氏相同而且没有解释时,它会按名字排序为什么当在该组中选择另一个人时,它总是显示具有相同姓氏的第一个人的记录。任何我deas?
Hello, if anyone out there can shed light on the fact that when a last name is selected in a combo box, and that name is shared by more than one person, why access is displaying the first record in the list of like names. (i.e. when choosing ''zach smith'' , ''andy smith''s record will be shown. I assume that it''s sorting by first names when last names are the same that doesn''t explain why it always shows the record of the first person amoung a group with the same last name when another person is selected within that group. any ideas?



你的组合框的RowSource和表结构是什么?


问候,

Scott

What is the RowSource and table structure for your combobox?

Regards,
Scott



组合框的RowSource和表结构是什么?


问候,

Scott
What is the RowSource and table structure for your combobox?

Regards,
Scott



Scott,

rowsource是一个querry。行源类型是''Table / Querry''。该querry的sql如下所示:


SELECT [客户]。[姓氏],[客户]。[名字]

来自客户

WHERE((([客户]。[服务协调员])= [表格]![召回客户统计]![cboSC]))或((([客户]。[等候名单地区])= [表格]![召回客户统计]![cbowaitlist]));


我希望能回答你的问题。

谢谢

tony


Scott,
the rowsource is a querry. the row source type is ''Table/Querry''. the sql for that querry looks like this:

SELECT [Clients].[Last Name], [Clients].[First Name]
FROM Clients
WHERE ((([Clients].[Service Coordinator])=[Forms]![recall client stats]![cboSC])) Or ((([Clients].[Waitlist Region])=[forms]![recall client stats]![cbowaitlist]));

I hope that answers your question.
thanks
tony



Scott,

rowsource是一个querry。行源类型是''Table / Querry''。该querry的sql如下所示:


SELECT [客户]。[姓氏],[客户]。[名字]

来自客户

WHERE((([客户]。[服务协调员])= [表格]![召回客户统计]![cboSC]))或((([客户]。[等候名单地区])= [表格]![召回客户统计]![cbowaitlist]));


我希望能回答你的问题。

谢谢

tony
Scott,
the rowsource is a querry. the row source type is ''Table/Querry''. the sql for that querry looks like this:

SELECT [Clients].[Last Name], [Clients].[First Name]
FROM Clients
WHERE ((([Clients].[Service Coordinator])=[Forms]![recall client stats]![cboSC])) Or ((([Clients].[Waitlist Region])=[forms]![recall client stats]![cbowaitlist]));

I hope that answers your question.
thanks
tony



嗨Tony,


问题可能出现,因为你没有使用一个独特的领域作为查询中的控制字段。我假设在你的组合框中,绑定列的默认值为1.这意味着组合框选项返回的值将是第1列中的值,在您的情况下是第1列,并且为姓氏字段包含重复项,其中第一个正在使用。


将您的ClientID字段作为select语句中的第一项添加到查询中,并确保绑定列为设置为1.


问候,

Scott

Hi Tony,

The problem is probably showing up because you aren''t using a unique field as a ''control field'' in your query. I''m assuming that in your combo box the bound column is the default of 1. This means that the value returned by the combo box choice will be the value from column 1, which in your case is the last name, and being as the last name field contains duplicates, the first of those is being used.

Add your ClientID field into the query as the first item in your select statement, and make sure the bound column is set to 1.

Regards,
Scott


这篇关于组合框选择给出了错误的记录 - 奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆