【发布时间】:2017-08-24 08:47:44
【问题描述】:
我的问题是 access 2010 中的组合框仅显示 1278 的 1249 个值。是否有可能增加 access 中组合框的最大值数?
这是一个代码示例:
If not rs.EOF Then
rs.MoveFirst
frm.FName.RowSource = ""
frm.FNameLux.RowSource = ""
Do Until rs.EOF
If rs![id] <> -1 And rs![id] <> -2 Then
If (rs!KID <> 2 And rs!KID <> 8) Then
If IsNull(rs![Name]) = False Then
frm.FName.AddItem rs![Name] & ";" & rs![id]
Debug.Print rs!Name 'The program writes all values in the combobox, but when I look in the form, I don't see all values
End If
End If
If (rs!KID = 2 Or rs!KID = 8) Then
If IsNull(rs![Name]) = False Then
frm.FNameLux.AddItem rs![Name] & ";" & rs![id]
End If
End If
End If
rs.MoveNext
i = i + 1
Loop
End If
rs 是记录集。有什么想法如何解决它或我必须做什么?
【问题讨论】:
-
组合框是在第一个 1249 项之后停止,还是随机项丢失?
-
@Andre 在
debug.print中查看所有值而不在相应项之后停止。 -
@Andre 所以,我发现当我用 2 列定义组合框时会出现问题。但我没有找到解决办法。
ColumnCount设置为 2 个ColumnWidths = 15cm;0cm、BoundColumn=2和Row Source Type = value list -
对不起,我的意思是
BoundColumn=1
标签: ms-access combobox vba ms-access-2010