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:

Recommended Answers

All 2 Replies

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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.