AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Stephen Jackson
Expertise
I can help with questions regarding VB.NET syntax and object references, with data interfaces and with the design and creation of robust, data aware object classes. I can also be very helpful with creating distributable applications and provide tricks and tips on .msi creation. I also have extensive experience in designing SQL Server Databases and interfacing them with VB.NET. I try to avoid web specific questions, as that is an area of expertise all its own.

Experience

Experience in the Area:
I have been a programmer in Visual Basic since version 1.0 and have worked with VB.NET (which is infinitely more powerful than previous versions) since its initial release and SQL Server, both as a corporate IT professional and professional consultant. I first wrote Basic in 1976 on a TRS 80 and have worked in Visual Basic 1.0 and every subsequent release of Microsoft Visual Basic. I worked for over 7 years as a Senior Level Consultant in the area and currently hold a Project Manager position in IT.

Education and Credentials:
MBA in Econometrics, 1983, University of Memphis. BBA in Financial Management, 1982, Fogelman College of Business and Economics, University of Memphis.
Microsoft Certified Professional

Areas of Special Expertise:
My specialty is the design of Object Oriented Solutions with robust, data aware object classes. I generally avoid the classic ‘Three Tier’ model as I find it redundant and cumbersome to maintain. I also specialize in the creation of ‘User Friendly’ User Interfaces which help lessen the need for user training and help prevent user error. I work best with Windows Forms based applications, and while I do work in C# as well, I prefer to limit my questions here to Windows Forms based applications created in Visual Basic.NET and SQL Server. I wil also address questions relating to the distribution and installation of Windows Forms based applications created in VB.NET.
 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > combobox

Topic: VB.NET



Expert: Stephen Jackson
Date: 3/24/2008
Subject: combobox

Question
QUESTION: how do i create such combobox that its fields are derived from a certain table of my database and every time you add a field on that table it automatically adds up also to my combobox?

ANSWER: Enrico,

Before I can answer the question, I need to clarify it.  Do you wish to populate a combo box that shows values from a field and will add new ones (or updates) as they are entered? If so, then yes, we can do that by creating a recordset from the table and then making that recordset the data source for the combo box.  If you wish to add fields from a table as they are entered, then that is much more complex and could be done in a variety of ways.  If you can clarify your question, I will do my best to help.

Thanks,

Stephen Jackson

---------- FOLLOW-UP ----------

QUESTION: yes, i want to populate my combobox and also add new fields as they are entered. can you give a sample code of it? thanks...

Answer
enrico,

It sounds then as though you will want to actually use more than a data column and a display column.  This will require something other than a simple combo box, I believe.  I think there is an available grid view that will allow you to show multiple columns.  You will then need to call a view of all columns in your table and set the data source of your control to the entire  dataset, all columns, though I am not sure why you would want to do this.  It would be possible to control all of this with code, but this would involve a great deal of code ... far more than I am capable of demonstrating here.  

Stephen Jackson

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.