组合框和列表框选择 [英] Combobox and list box selection

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

问题描述

我有一个组合框,它显示了table1中的col1,我有一个按钮OK。旁边。

我还有一个列表框,我希望它显示来自table1的特定记录的其他信息(col2)。

注意:表一有两列只有两个都是主键(有重复值)。


问题是:

1-如何使OK按钮显示记录来自组合框的所选项目的列表框?

2-当我打开数据库时,如何使列表框不显示任何内容(默认为&;)?

3-有没有办法隐藏列表框,一旦用户选择组合框并点击确定按钮,列表框就会显示相关记录?


任何输入都被重视

谢谢

I have combo box which displays col1 from a table1, I have a button "OK" next to it.
I also have a listbox which I want it to displays other information (col2) from table1 for a particular records.
Note: table one has two column only, both are the primary keys (there are duplicate values).

questions are:
1- How can I make the OK button to displays records in the list box for the selected item from combobox?
2- How can I make the List box to diplay nothing when I open the database (default to "")?
3- Is there a way to hide the list box, once the user make a selection form combo box and hit the OK button than the list box appear with the relavent records?

Any input is valued
thanks

推荐答案

1。添加代码以更改''ControlSorce''属性。

2.将ListBox.ListIndex设置为-1(我认为)

3.设置.Visible属性 - as在你的另一篇文章中。
1. Add code to change the ''ControlSorce'' property.
2. Set ListBox.ListIndex to -1 (I think)
3. Set the .Visible property - as in your other post.



1.添加代码以更改''ControlSorce''属性。

2.将ListBox.ListIndex设置为-1(我认为)

3.设置.Visible属性 - 与您的其他帖子一样。
1. Add code to change the ''ControlSorce'' property.
2. Set ListBox.ListIndex to -1 (I think)
3. Set the .Visible property - as in your other post.



NeoPa


我需要更多澄清。

NeoPa

I need more clarification please.


你到底有多远到目前为止你的尝试Tara?
How far have you got so far with your attempts Tara?


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

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