Access 2013 VBA:使用单个数据项填充多列列表框 [英] Access 2013 VBA: fill multicolumn listbox with individual data items

查看:264
本文介绍了Access 2013 VBA:使用单个数据项填充多列列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Access 2013程序中,我想用"do while .... wend"中的数据填充多列列表框。循环。

Within a Access 2013 procedure, I would like to fill a multi-column list box with data within a "do while .... wend" loop.

我知道我可以添加一个带有".AddItem"的新行。并填写第一列。但是如何填写新行的第二列和更多列。

I know that I can add a new row with ".AddItem" and fill in the first column. But how to fill in the second and further column of the new row.

我该如何实现?

推荐答案

Hi Albert,

Hi Albert,

列表框的RowSourceType是什么?如果是值列表,我建议您尝试以下内容:

What is your RowSourceType for listbox? If it is value list, I suggest you try something like below:

Me.List19.ColumnCount = 3
Me.List19.RowSourceType = "value list"
Me.List19.AddItem "Col1" & ";" & "col2" & ";" & "Col3"
Me.List19.AddItem "Col11" & ";" & "col12" & ";" & "Col13"

最好的问候,

Best Regards,

Edward


这篇关于Access 2013 VBA:使用单个数据项填充多列列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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