473,320 Members | 1,951 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,320 software developers and data experts.

I have a listbox full of database items. How do I add item "All ofthe above"

I have a listbox of cities.
The listbox is bound to a database table.
But I want to add the option - "all cities" to the listbox.
How do I do that?

Thanks,
Marvin
Jun 27 '08 #1
2 1068
After you bind the control, do something like

listbox1.items.add("All Cities")

<CO*********@lycos.comwrote in message
news:fd**********************************@f63g2000 hsf.googlegroups.com...
>I have a listbox of cities.
The listbox is bound to a database table.
But I want to add the option - "all cities" to the listbox.
How do I do that?

Thanks,
Marvin

Jun 27 '08 #2
Use the Listbox.Items.Insert method after binding the data to a datasource.

Regards,

Trevor Benedict
MCSD
"Matt MacDonald" <ma******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
After you bind the control, do something like

listbox1.items.add("All Cities")

<CO*********@lycos.comwrote in message
news:fd**********************************@f63g2000 hsf.googlegroups.com...
>>I have a listbox of cities.
The listbox is bound to a database table.
But I want to add the option - "all cities" to the listbox.
How do I do that?

Thanks,
Marvin


Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Seb Delcampe | last post by:
Hello, I am facing two problems with Full-text search. 1° My query looks like: SELECT id, title FROM myTable WHERE ((MATCH(title) AGAINST ('-myword' IN BOOLEAN MODE))) I thought this...
1
by: Lee Rouse | last post by:
I have a secured Access 2000 database. There are approximately 30 user accounts already set up. Each user logs into their copy of the front-end by via a desktop shortcut which includes their...
3
by: tobhamlet | last post by:
If one is using a query as a Row Source on a Form, is there a way to set up a blank space, or to insert the word "ALL" in a combo box that represents ALL combo box row items. The scenario is as...
1
by: S.Guhananth | last post by:
I need to capture a country from dropdown list and use that in sql query. How to do this protected DataSet GetCountry() { I have the code for this block
3
by: MeNotHome | last post by:
I am trying to automate web browser navigation and form fill out in vb.net Why doesn't this work? AxWebBrowser1.Document.Forms(0).All("action-download").click() I also tried...
3
by: Robert Kilroy | last post by:
Greetings, I've been working on this for a few hours now. It seems to be a pretty simple task but I keep running into " has no properties". I have a select box defined as follows: <SELECT...
3
by: Cirene | last post by:
I have a databound dropdownlist. It is acting as a "filter" for a gridview. I wanted to add "ALL" to the first item on the list. Question: In the SQLDataSource (that the ddl is bound to) how do...
3
by: kimiraikkonen | last post by:
Hi, I want to display ALL the items (includes unselected items) of listbox control. How can i code this? Should i use "for each" or other? For example: Assume you have a listbox with 3 items...
19
by: Daniel Pitts | last post by:
I have std::vector<Base *bases; I'd like to do something like: std::for_each(bases.begin(), bases.end(), operator delete); Is it possible without writing an adapter? Is there a better way? Is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.