|
-
Feb 17th, 2007, 02:19 AM
#1
Thread Starter
Lively Member
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:
ElseIf KeyAscii = 13 And .Col = .Cols - 1 And .Row = .Rows - 1 Then
If Val(Text12.Text) = Val(Text13.Text) Then
Text14.SetFocus
Else
aa = MsgBox("Do you want to continue", vbYesNo + vbInformation, "Project1")
Call amtcal
i = .Row
If aa = vbYes Then
If gridblank(CInt(i)) = 1 Then Exit Sub
.Rows = .Rows + 1
.Row = .Row + 1
.TextMatrix(.Row, 0) = Val(.Rows - 1)
.Col = 1
.SetFocus
Else
If gridblank(CInt(i)) = 1 Then Exit Sub
Call amtcal
SendKeys "+{end}"
Text14.SetFocus
End If
End If
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. 
-
Feb 17th, 2007, 06:10 AM
#2
Re: how to move within MSFlexGrid.....
Try this one
VB Code:
If Val(Trim(Text12.Text)) = Val(Trim(Text13.Text)) Then
Please mark you thread resolved using the Thread Tools as shown
-
Feb 17th, 2007, 09:10 AM
#3
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|