VBA中的SQL - 填充列表框 [英] SQL in VBA - populating listbox
本文介绍了VBA中的SQL - 填充列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从访问表单上的另一个列表框填充列表框。我的第一个列表框包含链接的odbc数据库上的表名。我试图根据第一个列表框中的表名选择在第二个列表框中显示表的元组
我是VBA的新手,并且我尝试以下列方式执行此操作:
I am trying to populate a listbox from another listbox on a access form. My first listbox has names of tables on a linked odbc databse. I am trying to display the tuples of the table in the second listbox based on the selection of table name in the first listbox
I am new to VBA, and am trying to do that in the following manner:
展开 | 选择 | Wrap | 行号
推荐答案
首先,我将把它移到Access论坛。然后我会看一下回答它。
Firstly, I am going to move this to the Access forum. Then I''ll have a look at answering it.
你不需要这里的记录集。另外我认为你应该使用After Update事件。请尝试以下代码...
You don''t need a recordset here. Also I think you should be using the After Update event. Try the following code...
展开 | 选择 | Wrap | 行号
非常感谢!!!
我以前的帖子是第一个在这里,不知道在哪里发布。我将通读指南,在适当的地方发布我未来的问题。很抱歉给您带来不便,并再次感谢及时的帮助。
Thanks a lot !!!
My previous post was the first one here, wasn''t sure where to post. I will read through the guide to post my future questions at an appropriate place. Sorry for the inconvenience, and thanks again for the timely help.
这篇关于VBA中的SQL - 填充列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文