error 30009 invalid row value-plz help-VBForums
Results 1 to 10 of 10

Thread: error 30009 invalid row value-plz help

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    9

    error 30009 invalid row value-plz help

    Hi can anybody help me in this?
    I have this small piece of code to populate the 1st col of a flexgrid

    J = 0
    Dim rsTmp As New ADODB.Recordset

    Set dbADI = New DAL.clsDb
    dbADI.OpenConnection "ADI"

    Set rsTmp = dbADI.RunQuery("tblEmpStn", , , , , False)

    If rsTmp.BOF = False And rsTmp.EOF = False Then

    rsTmp.MoveFirst


    With MSFlexGrid1

    Do Until rsTmp.EOF

    MSFlexGrid1.Col = 0
    MSFlexGrid1.Row = J ------>here it shows the above error...?
    MSFlexGrid1.Text = rsTmp!FirstName
    J = J + 1
    rsTmp.MoveNext

    Loop

    End With


    I have set the fixed row to 1 in flexgrid properties.


    How can I overcome this?


    End If

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: error 30009 invalid row value-plz help

    This link should help you

  3. #3
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: error 30009 invalid row value-plz help

    Try changing
    Code:
    J = 0
    to
    Code:
    J = 1
    Last edited by RobCrombie; May 6th, 2007 at 03:34 AM.
    Rob C

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    9

    Re: error 30009 invalid row value-plz help

    yea i tried doing it,nothing changed,still the same error :-(

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    9

    Re: error 30009 invalid row value-plz help

    the link is not helping it either.

  6. #6
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: error 30009 invalid row value-plz help

    It would not be the db stuff, so could you take a copy and strip it down to the bare bones (eg no db stuff).
    Then attach it, so we can check it out.
    Rob C

  7. #7
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: error 30009 invalid row value-plz help

    PS
    You don't show the declarations.
    Sometimes the error that VB stops on, is not the original error.
    Do the following, as it can reveal the true problem.

    Have you set Option Explicit ?
    Have you run with full compile (use ALT R F to run the program)
    Rob C

  8. #8

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    9

    Re: error 30009 invalid row value-plz help

    Done both (Option Explicit,Alt R F).

    Private Sub cbooffice_Click()

    J = 1

    Do Until...

    With MSFlexGrid1
    .Col = 0
    .Row = J
    .Text = rsTmp!FirstName
    J = J + 1
    End With

    Loop

    End Sub

  9. #9
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: error 30009 invalid row value-plz help

    Are you still getting an error ?

    Can you strip out the DB stuff and attach the project ?

    Where is J declared ?
    It should be in the Sub
    Rob C

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: error 30009 invalid row value-plz help

    Check the value of rsTmp!FirstName field in the IDE.

    How large is your Flex grid and does it go out of scope?

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.