How to add items in combobox using database in vb6.0
Actually in my project using radio buttons ,combobox and textbox
If i clicked on radio button then its types can be display on combobox using msaccess database and then if i select one of them item in combobox then it will display on textbox
An expert who has achieved level 2 by getting 100 points
An expert that got 10 achievements.
An expert that got 5 achievements.
An expert whose answer got voted for 100 times.
Re: how to add items in combobox using database in vb6.0
There are 2 ways:-
you can set the recordsource in the properties for the comboBox to a table or create a recordset and loop through it adding one item at a time, see example below:-
Dim dept As String Dim db As DAO.Database Dim rst As DAO.Recordset Dim qd As DAO.QueryDef Dim varResults Dim oMessage Dim sQueryName As String Set db = CurrentDb
mdbname.[Form_Name].Department.SetFocus dept = formname[Form_Name].Department.Text sQueryName = "Query_Name" Set qd = db.QueryDefs(sQueryName) ' ' set up input field for query ' qd.Parameters("field_from_query") = dept Set rst = qd.OpenRecordset() Dim recCount As Integer recCount = rst.RecordCount If recCount > 0 Then With rst .MoveLast .MoveFirst Do While Not .EOF listBoxproducts.AddItem .Fields("pname") listboxCode.AddItem .Fields("pcode") listboxPrice.AddItem .Fields("pprice") .MoveNext Loop End With rst.Close
Set rst = Nothing Set qd = Nothing Set db = Nothing
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need. goodluck!
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
It's probably an addon in IE thats causing it to crash. Here is how to disable them:
From the Internet Explorer menu, click Tools ' Internet Options.
Click the Programs tab.
Click Manage add-ons.
Click the Add-on you wish to disable, then click the Disable radio button. Note that this option will only be available when an Add-on is selected.
users also have the ability to detele the ActiveX control. Follow the
steps outlined above to select the ActiveX control, then click the Delete button found under Delete ActiveX. Note that this option will only be available when an ActiveX control is selected.
Not all Add-ons in the list are active. To see which Add-ons are actively loaded with Internet Explorer, toggle the Show dropdown to view Add-ons currently loaded in Internet Explorer.
Click OK to exit the Manage Add-ons menu
Click OK to exit the Internet Options menu
If a necessary add-on has been mistakenly disabled, repeat steps 1-3 above, highlight the disabled add-on, then click the Enable radio button.
Close Internet Explorer and restart it for changes to take effect
I would personally use Firefox or Chrome instead though...
Just follow these steps: 1. Click on Start -> Control Panel. 2. Click on Add hardware applet. 3. On the Add Hardware Wizard, click on Next button. 4. Select “Yes, I have already connected the hardware” radio button and then click Next button. 5. Choose “Add a new hardware device” at the bottom of the list and then click Next. 6. Select “Install the hardware that I manually select from a list (Advanced)” and click Next. 7. Select “Sound, video and game controllers” from “Common hardware types” list and click Next. 8. Select “(Standard system devices)” from “Manufacturer”.
Note: To install or reintall video codecs, select “(Standard system devices)” from “Manufacturer” and “Video Codecs” from “Model” instead. 9. Click on “Have Disk…” button. 10. Click Browse button in the Install From Disk dialog box. Navigate to folder C:\Windows\System32, and then locate mmdriver.inf file. Highlight mmdriver.inf and click Open or simply double click on mmdriver.inf file, then click OK in the Install From Disk dialog box.
Click on “Continue Anyway” button if a warning about logo compatibility pops up. 11. A list of audio codecs supported by mmdriver.inf appears on the Add Hardware Wizard.
Nice project you can easy solve this problem first you want to known how to connect the java with sql or some other database. http://www.academictutorials.com/ this is the site this help you for your project. If you have any problem just contact me i will clear it.