itsboyd
asked on
How do I load data from a local Access 2007 (.accdb, i.e NOT SQL) database to a single combo box.
I have a Visual Studio 2008 program with a working 2007 Access Database connected to the project. The data source has been set up and the Data Set. This is my connection string: Provider=Microsoft.ACE.OLE DB.12.0;Da ta Source=|DataDirectory|\sup erbooks.ac cdb
In the database I have a Table named Clients with basic contact information and one of the columns (fields) is Company Name. I want to create a combo box that loads all the "Companies" into that Combo box. When the user selects the company, the other text boxes on the form will reflect the remaining corresponding fields for that record. In other words, when the user selects a "Company" the "First Name, Last Name and Phone number," fields will be displayed in text boxes.
In the database I have a Table named Clients with basic contact information and one of the columns (fields) is Company Name. I want to create a combo box that loads all the "Companies" into that Combo box. When the user selects the company, the other text boxes on the form will reflect the remaining corresponding fields for that record. In other words, when the user selects a "Company" the "First Name, Last Name and Phone number," fields will be displayed in text boxes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are not able to download the zip then you can copy the code provided in the article and create new form add the code to verify.
ASKER
om prakash p:
Working through code now. Do you have a version of this that is closer to Visual Basic.net? Using Visual Studio 2008 and the code supplied in tutorial has many syntax errors. Not sure if it's the same programming language I'm using (using default Visual Basic) ... I am a beginner. Thanks.
Working through code now. Do you have a version of this that is closer to Visual Basic.net? Using Visual Studio 2008 and the code supplied in tutorial has many syntax errors. Not sure if it's the same programming language I'm using (using default Visual Basic) ... I am a beginner. Thanks.
ASKER
Do you have a direct link to the Zip file for your Source Code on that tutorial? The link at the top of the tutorial ("Download Source Code - 24kb") is broken. Your solution looks like what I am looking for, but want to test further to verify. Thanks.