469,366 Members | 2,242 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

Multicolumn listbox add item


I have two textboxes and a multicolumn listbox on the form. User enters first name in one textbox and last name in the other. After "submit" button is clicked I want first and last name to be displayed in the listbox (first name in column 0 and last name in column 1). Can anyone help me with what list function I should use?
I've tried using listbox.additem function passing array as parameter, but that does not work.
Any help would be greatly appreciated.
Mar 14 '07 #1
6 34316
12,516 Expert Mod 8TB
AddItem only works if the listbox is set to value list. And you don't pass it an array, you pass it a string.

If it's a table/query, then you can use a .Requery to refresh it.
Mar 14 '07 #2
i have it set to "value list" and the reason i was trying to pass an array is because its a multicolumn listbox.
I used list1.additem string1 on listboxes with a single column, but I cant figure out how to apply it to populate values in different columns
Mar 14 '07 #3
12,516 Expert Mod 8TB
Even with a multicolumn listbox you pass it a string.
Expand|Select|Wrap|Line Numbers
  1. "Value1;Value2;Value3"
Mar 14 '07 #4
Thanks a lot. I spend hours trying to find it online... and all i had to do is separate values with semicolons.
Thanks a lot!!!
Mar 14 '07 #5
12,516 Expert Mod 8TB
Not a problem, good luck.
Mar 14 '07 #6
Lol... I've done the exact same thing... Hours searching.

Nov 25 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Mazin Al-Noaimi | last post: by
6 posts views Thread by Lars Netzel | last post: by
1 post views Thread by zoneal | last post: by
7 posts views Thread by Paul Bromley | last post: by
2 posts views Thread by dev.amit | last post: by
5 posts views Thread by WRH | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.