ComboBox使用ListBox作为数据源 [英] ComboBox use ListBox as data source

查看:138
本文介绍了ComboBox使用ListBox作为数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一些ListBox来保存来自Access数据库的数据。在

我表单的另一个标签上,我需要用户使用ComboBox从其中一个ListBox中选择一个

项。我已将ComboBox附加到我的Access

数据库,这很好用。但是,在我看来,我应该能够将它连接到具有相同信息的ListBox。我可以这样做吗?

这个艺术

Hi,

I''ve got a number of ListBoxes that hold data from an Access database. On
another tab of my form I need the user to use a ComboBox to choose one of the
items from one of the ListBoxes. I have attached the ComboBox to my Access
database and this works fine. However, it seems to me that I should be able
to attach it to the ListBox that has that same information instead. Can I do
this?

Art

推荐答案

我没有'测试了这个,但是你应该可以做到这一点...


Dim L作为新的ListBox

Dim C作为新的ComboBox

''''在ListBox上进行数据绑定

C.DataSource = L.DataSource


希望这会有所帮助

Chris

" Art" < Ar*@discussions.microsoft.com>在消息中写道

新闻:8F ********************************** @ microsof t.com ...
I haven''t tested this but you should be able to do this...

Dim L as new ListBox
Dim C as new ComboBox
''''Do Databindings on ListBox
C.DataSource = L.DataSource

Hope this helps
Chris
"Art" <Ar*@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...

我有很多ListBox来保存Access数据库中的数据。在我的表单的另一个选项卡上,我需要用户使用ComboBox从其中一个ListBox中选择一个
项目。我已将ComboBox附加到我的
Access
数据库,这很好用。但是,在我看来,我应该能够将它附加到具有相同信息的ListBox。我可以吗
这个吗?

艺术
Hi,

I''ve got a number of ListBoxes that hold data from an Access database. On
another tab of my form I need the user to use a ComboBox to choose one of
the
items from one of the ListBoxes. I have attached the ComboBox to my
Access
database and this works fine. However, it seems to me that I should be
able
to attach it to the ListBox that has that same information instead. Can I
do
this?

Art



艺术,

是的,通过创建更多数据视图(使用sort和/或rowfilter)并将其用作

数据源。


我希望这有帮助吗?


Cor
Art,

Yes by creating more dataviews (with sort and/or rowfilter) and use that as
the datasources.

I hope this helps?

Cor


Cor,


谢谢 - 但我不喜欢知道得足以真正理解。另外在

引用Chris的回复中,我没有将我的ListBox连接到

数据源。我通过从数据库中读取来填充它们(也许这不是好的b $ b)。


不幸的是我不知道数据视图 ; - 你能把我推荐给我吗?或者给我一些提示。


我很抱歉开始这么少的知识和经验很少

在这个区域。


谢谢,


艺术


" Cor Ligthert"写道:
Cor,

Thanks -- but I don''t know enough yet to really understand. Also in
reference to the response from Chris, I don''t have my ListBoxes connected to
a datasource. I fill them up by reading from a database (perhaps this isn''t
good).

Unfortunately I don''t know about "dataviews" -- could you refer me to
something or give me a hint.

I apologize for starting out with so little knowledge and little experience
in this area.

thanks,

Art

"Cor Ligthert" wrote:
艺术,

是的,通过创建更多数据视图(使用sort和/或rowfilter)并将其用作数据源。 />
我希望这会有所帮助吗?

Art,

Yes by creating more dataviews (with sort and/or rowfilter) and use that as
the datasources.

I hope this helps?

Cor



这篇关于ComboBox使用ListBox作为数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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