User Login

TipidPC.com is the leading resource for buying and selling brand new and second-hand computer parts and peripherals in the Philippines. Have something to sell? Sign up for an account now. It's absolutely free!

Forum Topic

help nman poh pano poh mga call ng combo box connect to access in visual basic 6.0

  • hello!

    help naman poh mga ka tipid pc masterz pano poh econnect ung combo box sa database po o ms access, ung ecacall nya poh ung database using combo box pra ung data sa ecall nyang database ay malipat sa isanf form o editing form! help naman poh..


    thankz
  • 1.Initialize the connection string
    2.Create sql query for the data you will be fetching
    3.Bind the datasource to the combo box
    4.Initialize the combo box id and data values etc.
  • +1
  • thankz poh sa advice
    `mc access lang poh ang gagamitin kong database kc di ako marunong sa sql, so ms access lag na database ung e call nya!
  • Pwede kang mag-sql sa ms access..In fact sql language ang gagamitin mo sa pag query sa ms access database na gagamitin mo.

    dont think na sql server platform or oracle ang ibig ko sabihin.
  • pwede naman po sa access, pag nag-create ka ng query, pwede mong ma-view iyong sql code non
  • Dim strSQL As String
    Dim strConn As String
    Dim myConn As Object
    Dim cmdSelect As Object
    Dim mySet As Object
    Dim I As Integer

    strSQL = "SELECT Description,commandline FROM CommandList"
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\CMDAdmin\cmd.mdb"
    Set myConn = New ADODB.Connection
    myConn.Open strConn
    Set cmdSelect = New ADODB.Command
    Set cmdSelect.ActiveConnection = myConn
    cmdSelect.CommandText = strSQL
    Set mySet = New ADODB.Recordset
    mySet.Open "tblCommandLines", myConn, adOpenKeyset, adLockOptimistic, adCmdTable
    For I = 1 To mySet.RecordCount
    Combo1.AddItem mySet(I)
    Next I
    mySet.Close
    myConn.Close
    Set mySet = Nothing
    Set myConn = Nothing


    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_24194712.html
  • Google is your friend.
  • AdoFoods.RecordSource = "select * from Food"
    AdoFoods.Refresh
    cbodeliveryproducts.Clear
    With AdoFoods
    .Recordset.MoveLast
    rec_count = .Recordset.RecordCount
    If rec_count <> 0 Then
    .Recordset.MoveFirst
    For i = 1 To rec_count
    cbodeliveryproducts.AddItem .Recordset.Fields(1)

    .Recordset.MoveNext
    Next
    End If
    End With

Who's Online

1393 active users within the last 5 minutes, 910 members, 483 guests.
Our newest member is ice_dano
Click here to see online members.

Browse Items

More »

Search TipidPC


New Want to Buys

Active Want to Buys