remove selected row |
Post Reply |
Author | |
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
Posted: 19 July 2007 at 7:03pm |
hello, how can I be able to delete/remove a selected row from the reportcontrol?
thank you,
|
|
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
|
hello,
any idea please?
|
|
NanoSofT
Newbie Joined: 31 July 2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
In Classic VB use this sub
the name 'lst' refer to the report control Sub Delete() Dim i As Long, Row As ReportRow If lst.SelectedRows.Count = 0 Then If lst.Records.Count = 0 Then Debug.Print "No Row(s) Exist to Remove" Else Debug.Print "Select The Row(s) you want to remove" End If ElseIf lst.SelectedRows.Count >= 1 Then Debug.Print "Ready TO Remove : " & lst.SelectedRows.Count & " Row(s)" If MsgBox("Are You Sure", vbInformation + vbYesNo) = vbNo Then lblStatus.Caption = "Remove cancelled" Exit Sub End If For Each Row In lst.SelectedRows Delete Row lst.Records.RemoveAt (Row.Record.Index) Next Debug.Print "Selected Rows removed successfully" lst.Populate End If End Sub try the reference next time (Codejock Path\help\SymbolReference.chm) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |