Results 1 to 4 of 4

Thread: [RESOLVED] error ..object required!! datagrid help pls

  1. #1

    Thread Starter
    Fanatic Member ksuwanto8ksd's Avatar
    Join Date
    Apr 2005
    Posts
    636

    Resolved [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

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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.

  3. #3

    Thread Starter
    Fanatic Member ksuwanto8ksd's Avatar
    Join Date
    Apr 2005
    Posts
    636

    Re: error ..object required!! datagrid help pls

    yes I solved this problem from your signature

    thanks and appreciate

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width