Jobs
Author: Christopher Date Submitted: 3/18/2006 Category: Database Compatibility: VB 6 This code has been accessed 13195 times.
Email Yourself this snippet:
'on the references select the microsoft activex dataobject 2.1 library. ' Create a database using microsoft access and the Filename is category and create table and name it as tblCategory" ' add combobox control and name it as cboCategory dim cn as new adodb.connection dim rs as adodb.recordset
Code
Private sub Form_Load() cn.provider = "Microsoft.Jet.Oledb.4.0" cn.open app.path & "\Category.mdb" if cn.state = adstateopen then set rs = new adodb.recordset rs.open "Select * from tblCategory",cn,adopendynamic,adlockoptimistc end if End sub Private sub cbocategory_Dropdown() cbocategory.clear rs.requery do while not rs.eof cbocategory.addtem rs![name of the fields] rs.movenext loop end sub 'guides lang po para sa mga beginners. ''''''''''''''''''''' 'christopher benasa''' ''''''''''''''''''''' 'for some comments and suggestion email me at blindpazz@yahoo.com