Results 1 to 3 of 3

Thread: how to move within MSFlexGrid.....

  1. #1

    Thread Starter
    Lively Member preethi_rjs's Avatar
    Join Date
    Dec 2006
    Posts
    80

    Smile how to move within MSFlexGrid.....

    hi,

    i am making receipt entry for my live project.i will use MSFlexGrid to get input against Invoice numbers.

    so venever last column has focus and if i press <enter>

    =>if text12 and text13 value are equal, text14 will hav focus. Else u'll get Msgbox so that u can add one more rows for ur flexgrid.

    VB Code:
    1. ElseIf KeyAscii = 13 And .Col = .Cols - 1 And .Row = .Rows - 1 Then
    2. If Val(Text12.Text) = Val(Text13.Text) Then
    3. Text14.SetFocus
    4. Else
    5. aa = MsgBox("Do you want to continue", vbYesNo + vbInformation, "Project1")
    6. Call amtcal
    7. i = .Row
    8. If aa = vbYes Then
    9. If gridblank(CInt(i)) = 1 Then Exit Sub
    10. .Rows = .Rows + 1
    11. .Row = .Row + 1
    12. .TextMatrix(.Row, 0) = Val(.Rows - 1)
    13. .Col = 1
    14. .SetFocus
    15. Else
    16. If gridblank(CInt(i)) = 1 Then Exit Sub
    17. Call amtcal
    18. SendKeys "+{end}"
    19. Text14.SetFocus
    20. End If
    21. End If
    22. End If

    in order to edit its content, i am able to view all contents in the grid. bt if i decrease the amount in amount column, i must get msgbox again, bt it moves directly to the text14 without promptin msgbox of adding a new row.

    i used the same coding as i did for Adding new receipt.

    also ill b using different text boxes in the invisble mode, while giving input.

    so hw am i to move in grid bt.columns, so that i get another row if the amount gets decreased????
    Preethi.

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: how to move within MSFlexGrid.....

    Try this one
    VB Code:
    1. If Val(Trim(Text12.Text)) = Val(Trim(Text13.Text)) Then
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    Lively Member preethi_rjs's Avatar
    Join Date
    Dec 2006
    Posts
    80

    Thumbs down Re: how to move within MSFlexGrid.....

    No....

    not working
    Preethi.

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