-
roskie21
on
November 05, 2009 10:55 PM
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
-
Flamemaster_Mico
on
November 06, 2009 06:56 AM
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.
-
handshake
on
November 06, 2009 07:05 AM
+1
-
roskie21
on
November 06, 2009 07:06 AM
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!
-
Flamemaster_Mico
on
November 06, 2009 07:24 AM
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.
-
vhane
on
November 06, 2009 07:26 AM
pwede naman po sa access, pag nag-create ka ng query, pwede mong ma-view iyong sql code non
-
arthurjr07
on
November 06, 2009 10:08 AM
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
-
Flamemaster_Mico
on
November 06, 2009 11:34 AM
Google is your friend.
-
hjoemark
on
November 07, 2009 04:27 PM
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