473,763 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
+ 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 35089
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
33946
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 three column so can any body help in this particle code ....
4
2629
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 goodness of my brain, I cant seem to find it anywhere and just not able to do a "using System.WIndows.form". WHere on earth can I get this work? Please help! I just need a simple multicolumn listbox. Why is this so difficult? :(
6
3211
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 look sokay but it's not a true Combobox... at all.. So my my customer wants to be able to type stuff into the textfield of combobox and then it's preselected in the list... With the solution I got that' simposiible.. since there are no real...
1
5056
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 top of the listbox eg. 5, 10, 'Go' As I need multiple rows of data I have a button to 'Load' this to the listbox. I'm stuck though as I'm having difficulty loading this correctly. Question: Woulkd I be better off with a datagrid for this job,...
7
6121
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
2038
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. I have dont it quite simply with ease in Access but here i am blank. 1.I want to show Three column in the list box. 2. I would populate this with the help of a query which picks data from two tables
5
17763
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... this.listBox3.Items.AddRange(new object { "Item 1, column 1", "Item 2, column 1", "Item 3, column 1",
3
5644
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 treeview. Having done some research it seems there was some rather extensive and laborious methods for achieving such an effect in VB6 but none of them satisfactory and the only method I can find that looks anywhere near like it might possibly be...
1
7868
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 want to be able to have 3 items across the listbox each with a icon and a tooltip. Something similar to the below.. Item 1 has a icon next to it and when i hover over it i get a tooltip displaying the error message. Then the same again for items...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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 we have to send another system
3
3523
muto222
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.