i found the solution:
http://www.vbforums.com/sh
Setting boolean value to true while the form is loading..
Main Topics
Browse All TopicsI am using a combo box to allow the user to change the view of a datagridview based on a value selected from the combobox (status). the datasource for the combobox is LIST as you can see below. When I open the form i am preloading the combobox to get it ready. For some reason I'm getting the error below when I open my form. I suspect the reason behind the error is the fact that I am using a LIST for datasource; consequently I am unable to read correctly the integer value of a selected status. So my question, how am i supposed to read the integer value for a selected status while the data source is a LIST?
Thank you,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
i found the solution:
http://www.vbforums.com/sh
Setting boolean value to true while the form is loading..
Business Accounts
Answer for Membership
by: mkarkoukliPosted on 2009-04-10 at 12:45:50ID: 24118645
Another way to ask my question: How do I stop cboStatusLookup_SelectedVa lueChanged event from firing when opening the form. It seems that when I load the datasource of the combobox It automatically fires the SelectValueChange event and when that happens there is nothing selected and as a result it causes the above error.