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

Mutually dependent drop-downs

I have 2 drop-downs on my web form. I need to make the contents of the second
one dependent on the choice from the first. How? I tried removing the
existing entries from the second listbox and reloading with new values but I
got an error "collection was modified, enumeration operation may not
execute". I am clueless what this means.
Nov 9 '06 #1
2 1183
Well, it would be very helpful if you showed the code you were running when
this exception is thrown. We can't guess what code you have written.

I suspect you have a for each loop and you are trying to modify the
collection you are looping through. Just a guess since you didn't bother
posting the code.

"mscertified" <ru****@tigerlily.comwrote in message
news:05**********************************@microsof t.com...
>I have 2 drop-downs on my web form. I need to make the contents of the
second
one dependent on the choice from the first. How? I tried removing the
existing entries from the second listbox and reloading with new values but
I
got an error "collection was modified, enumeration operation may not
execute". I am clueless what this means.

Nov 9 '06 #2
I have it working now, I just replaced the FOR...EACH loop with a DO WHILE
loop and now it works perfectly.

"Marina Levit [MVP]" wrote:
Well, it would be very helpful if you showed the code you were running when
this exception is thrown. We can't guess what code you have written.

I suspect you have a for each loop and you are trying to modify the
collection you are looping through. Just a guess since you didn't bother
posting the code.

"mscertified" <ru****@tigerlily.comwrote in message
news:05**********************************@microsof t.com...
I have 2 drop-downs on my web form. I need to make the contents of the
second
one dependent on the choice from the first. How? I tried removing the
existing entries from the second listbox and reloading with new values but
I
got an error "collection was modified, enumeration operation may not
execute". I am clueless what this means.


Nov 9 '06 #3

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

Similar topics

5
by: Doug Baroter | last post by:
Hi, DDL: -- create table #task (taskID int identity(1,1) primary key, taskName varchar(25) unique, taskCompleteDate dateTime, taskComplete bit default(0)); /* Business Rules: a) if...
3
by: softengine | last post by:
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table. Can and how...
5
by: WertmanTheMad | last post by:
Ive been playing with this for a few days and thought I might thow it out for seggestions. I have Several Queries that need counts returned The Queries are Mutually Exclusive meaning whatever...
10
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions,...
6
by: jeniffer | last post by:
Please give an example of 2 simple mutually recursive functions in C .
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
4
by: Dooman | last post by:
Hello, I am getting this error when binding a drop down list box to a dataset: The 'SelectedIndex' and 'SelectedValue' attributes are mutually exclusive I have looked at other posts and...
5
by: rodeoval | last post by:
I need to have three drop down lists, but the dependent should get the values from the database without refreshing the page..If knows,someone pls reply soon
4
by: deanndra | last post by:
First, I want to say thank you to Scott and the others who replied to my first post here. I had to put that database on hold for the moment when I was tasked with a new one. I am building another...
0
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,...
0
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$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
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
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,...
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...

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.