954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JComboBox with database

Hi guys well I have created a JComboBox that lists all my values from a String. However I want instead of the values for the JComboBox to be in a String the values to be displayed in the JComboBox from my database so if more values are added to the database the values will be in the JComboBox. So how would I do this?

Any help would be appricated


My code is below that I have used:

I'VE SOLVED MY PROBLEM REMOVED MY CODE:

TIM_M_91
Junior Poster in Training
58 posts since Feb 2012
Reputation Points: 18
Solved Threads: 0
 

Under the form load, you can enter:

Me.ComboName.RowSource = "SELECT [TBL].[IDField1], [TBL].[NameField2] FROM [TBL] IN '" & DBpath & "' ORDER BY [IDField1];"


Or have you solved this thread completely? Mark as solved if so...

StephNicolaou
Posting Whiz in Training
204 posts since Nov 2007
Reputation Points: 77
Solved Threads: 18
 

please mark this thread as solved if your problem has solved.

rushikesh jadha
Junior Poster in Training
89 posts since Dec 2011
Reputation Points: 4
Solved Threads: 11
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: