如何使用组合框填充列表框? [英] How to populate a listbox using a combo box?

查看:106
本文介绍了如何使用组合框填充列表框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组合框(cboStore)和一个列表框(Qlist)都未绑定到表单调用frmFAQ。我想要的是能够从组合框中选择一个主题并将结果显示在列表框中。


在combox的rowsource中我有这样的代码:

I have a combo box (cboStore) and a listbox (Qlist) both are unbound to a form call frmFAQ. What I want is to be a able to select a Subject from the combo box and have the results show up in the listbox.

In the rowsource of the combox I have this code:

展开 | 选择 | Wrap | 行号

推荐答案

现在设置方式,列表框应显示Listtbl中的每条记录在Subjecttbl中有一个匹配的SubID。


列数和列宽是否设置校正?


如果你想填充它列表框取决于com中的选择bo box,然后你必须在组合框的After Update事件中添加代码。

The way it is set up right now, your list box should show every record in Listtbl that has a matching SubID in Subjecttbl.

Is the column count and column widths set up correction?

If you want it to populate the list box depending on the choice in the combo box, then you have to add code to the After Update event of the combo box.

展开 | 选择 | Wrap | 行号


Theres也是微软下载页面上的一个示例访问文件,它正是这样做的。

http://www.microsoft.com/downloads/d...DisplayLang=en


看看
Theres also an example access file on microsofts download page that does exactly this


http://www.microsoft.com/downloads/d...DisplayLang=en

Have a look


见(在表单上过滤示例。)以获得更全面的解释。

在您的SQL中,您试图引用表格上的项目。 SQL虽然在表单之外(在SQL引擎中)执行,因此对表单上控件的本地引用将无法正确解释(或者甚至完全解释)。
See (Example Filtering on a Form.) for a fuller explanation.
In your SQL though, you are trying to reference items on a form. The SQL though, is executed outside of the form (in the SQL engine) so local references to the controls on the form will not be interpreted correctly (or at all even).


这篇关于如何使用组合框填充列表框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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