[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Drop down source from separate table

Posted on 2013-01-14
6
Medium Priority
?
753 Views
Last Modified: 2013-11-26
I'm working on creating a combobox that will be limited to the data found in a table named "departments" in an ms access db.  The combobox value stored in a separate dataset and saved to a different table in the same database is limited to the list loaded from the "department" table.  I have the Use databound items checked with these settings:

Datasource: DepartmentsBindingSource
Display Member: DepartmentName
Value Member: DepartmentID
Selected Value: tCriteriaBindingSource - Department   <<<-- This is the different dataset and should store the desired value from the combobox b ut the form locks up and I can't tab off or even close the form once something is selected from the drop down list.

I'd love to do this without using ADO.  Is there a way to do this with just the settings available in the combobox itself?

Thanks
0
Comment
Question by:zipnotic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 

Author Comment

by:zipnotic
ID: 38776891
I deleted and rebuilt the departmentsbindingsource a few times - no luck

I changed the column definitions in the ms access database to make sure they were the same (tried integer, long integer, and double) - no luck

I deleted the xsd for the separate departmentsbindingsource and added the table to the main datasource - no luck.

I checked to see that the .selectedvalue of the combobox when it changes is actually a number.

i checked in the dataset designer that the query for that table/field was a double. (changed everything to a double)

---Everything looks like it should work.  The drop down expands and you can select an item but as soon as you do nothing works on the form.  You can't close it, you can't go to another box, you can't select something else in the combobox.  If I type a number in the combobox everything works fine.  It even saves it to the database.  What in Sam's Hill could cause such behavior?
0
 

Author Comment

by:zipnotic
ID: 38778902
This is a very frustrating problem.  Spent way too many hours trying to figure it out.  Can ANYONE give some ideas?

Combox Settings:
Datasource: sourcetableBINDINGSOURCE
Display Member: TextColumn from sourcetableBINDINGSOURCE
Value Member: PK Field from sourcetableBINDINGSOURCE
Selected Value: DestinationTableBINDINGSOURCE - FieldToStoreIn

I can type in an integer and it will store it fine but when I try to select one of the drop down values it locks up the form.  No error.  I have to click the stop button in VS IDE to close the program.  I made sure both source column and destination columns are integers and updated the dataset properties for those columns.

Any Ideas?  No way this should be so hard to figure out.  It's got to be something simple.
0
 

Accepted Solution

by:
zipnotic earned 0 total points
ID: 38787471
Figured it out.  It was as simple an answer as there could be.  When you choose the selected value with the expandable arrow it defaults in the databindings properties to 'text'.  I needed to manually change it to selectedvalue.  

Problem solved, lesson learned.
0
 

Author Closing Comment

by:zipnotic
ID: 38787483
Self-answered.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question