473,378 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 35044
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

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

Similar topics

by: Mazin Al-Noaimi | last post by:
Hi all, I want to add three values each time to the list box to be as one record for example I have first name, last name, phone number values I want to add them to a listbox once to be...
by: kackson | last post by:
Hi. I attempted to create a multicolumn listbox for my web based aspx application. I search the net, all I get is something like listview or I need to have system.windwos.form. But for the...
by: Lars Netzel | last post by:
I have ask this before and I got a link to a solution where you actually show a new from on top of everything with a listbox in, where you can have multicolumns.. and that's what I use now.. That...
by: zoneal | last post by:
Hi I have a form with a listbox, two comboboxes and two Radiobuttons. What I want to do is make a selection from both comboboxes and either Radiobutton and display these three elements across the...
by: Paul Bromley | last post by:
How can I use this please - I need 2 columns. I have been having difficulty finding info on this and the 2005 Treeview control today. Many thanks for any links or info, Paul Bromley
by: dev.amit | last post by:
Hello Friends I am a new bee to the world of vb. I have an appication in the MS Access and now i have to convert it to the Vb. I am having problem creating multicolumn Listbox in the vb form....
by: WRH | last post by:
Hello I want to have a multicolumn listbox. I never used one before so I looked at a Help example. I set the multicolumn property and the column width and tested with this example... ...
by: balabaster | last post by:
Hey guys and gals, I'm not sure if this is the simplest way to do this or if someone can throw any other ideas out there. I'm looking to build a treeview inside a listbox...or have a multicolumn...
by: piercy | last post by:
Hi, ive been trying to produce something using a listview control which shows error messages for the emails sent from my application. Its a wierd concept so im going to try explain it best i can. I...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.