Adding values multiple columns to listbox in form access vba

前端 未结 5 1768
谎友^
谎友^ 2021-01-13 02:07

I have problem with adding values to multiple columns in listbox in access. I have tried solution like this: Adding items in a Listbox with multiple columns and this: vba li

5条回答
  •  青春惊慌失措
    2021-01-13 02:34

    Firstly set the following properties for list box

    Row source type: value list Column count: 2

    Suppose name of list box is : listName Let us assume that u want to add two different elements in two different columns and two different strings are stored in

    String1 and String2 then follow the code

    Code:

    Dim strName as string
    strName=String1&";"&String2
    Me.listName.addItem strName
    

提交回复
热议问题