首页 > 解决方案 > MS Access Multiple value from a FORM into table as a Single Line

问题描述

To avoid Multiple Value fields, I need some help to configure the "multi-select" option of a FORM within MS Access to a SINGLE line/field.

Example:

enter image description here

And in the Table it should come out like one single line/field

Example

enter image description here

Is this even possible? if Show can someone help me?

标签: databasevbaformsms-accessmultivalue

解决方案


沿着这些思路

Dim l As Long
Dim s As String

For l = 0 To Me.ListBox1.ListCount - 1
    If Me.ListBox1.Selected(l) Then
        s = s & Me.ListBox1.List(l) & ","
    End If
Next l

s = Left(s, Len(s) - 1)
Debug.Print s

推荐阅读