473,473 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multicolumn listbox add item

25 New Member
Hello!

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 35058
Rabbit
12,516 Recognized Expert Moderator MVP
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
is49460
25 New Member
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
Rabbit
12,516 Recognized Expert Moderator MVP
Even with a multicolumn listbox you pass it a string.
Expand|Select|Wrap|Line Numbers
  1. "Value1;Value2;Value3"
Mar 14 '07 #4
is49460
25 New Member
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
Rabbit
12,516 Recognized Expert Moderator MVP
Not a problem, good luck.
Mar 14 '07 #6
Lol... I've done the exact same thing... Hours searching.

Thanks
Nov 25 '10 #7

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

Similar topics

1
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...
4
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...
6
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...
1
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...
7
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
2
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....
5
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... ...
3
balabaster
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...
1
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.