I face problem on datagrid, I have mark bolt to the error part
can anyone pls hlp.
thanks in advance
run time error
object required..
form load eventCode:Sub readGrid2() Dim msql As String msql = "select productid,productname," & _ " Unit, partnumber, brand, location, pcsperbox, inrperbox, colour, purchaseprice, saleprice" & _ " From product " & _ " Where productid =" & Val(txtkodebarang.Text) & "" 'If rs.State = adStateOpen Then rs.Close Rs.CursorLocation = adUseClient 'For Sortinf con_Data.Execute (msql) Rs.Open msql, con_Data, adOpenKeyset, adLockPessimistic, adCmdText Set DataGrid1.DataSource = Rs DataGrid1.Refresh End Sub
Code:Private Sub Form_Load() con_Data.Open string1 Call readGrid2 End Sub




support clasicVB6
Reply With Quote