[RESOLVED] error ..object required!! datagrid help pls
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..
Code:
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
form load event
Code:
Private Sub Form_Load()
con_Data.Open string1
Call readGrid2
End Sub
Re: error ..object required!! datagrid help pls
See the first "common errors" link in my signature, the explanation (and some solutions) for this error can be found there. In this case, txtkodebarang is what you should be looking at.
Re: error ..object required!! datagrid help pls
yes I solved this problem from your signature
thanks and appreciate
Re: error ..object required!! datagrid help pls
Quote:
Originally Posted by ksuwanto8ksd
yes I solved this problem from your signature
thanks and appreciate
If this is the case then you could help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.
Thank you. :)