The current row is not available
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: The current row is not available

  1. #1
    Join Date
    Mar 2011
    Posts
    34

    The current row is not available

    why is that im having a msgbox whenever i put this on my form activate.

    Microsoft DataGrid Control
    The current row is not available


    but my program works fine its just that this msgbox is anoying. i also have this code in my form load.

    Code:
    Private Sub Form_Activate()
    
    RSconn "select *from tblaccessac"
    Set DataGrid1.DataSource = RSasc
    DataGrid1.Refresh
    
    End Sub

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,101

    Re: The current row is not available

    Just a stupid question.

    Why do you need that code in both the Load event and Activate event?

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: The current row is not available

    The shown code is not very descriptive.
    I GUESS RSconn will select a recordset from a database which will be put into a global Recordset variable named RSasc.
    Then The Datagrid Datasource is set to this recordset, producing the error.
    You better first check if RSasc contains any valid records before assigning it to be the DataSource of the DataGrid.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center