home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form DeleteRecipient
- BorderStyle = 3 'Fixed Dialog
- Caption = "Delete Recipent"
- ClientHeight = 3195
- ClientLeft = 2760
- ClientTop = 3750
- ClientWidth = 6030
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3195
- ScaleWidth = 6030
- ShowInTaskbar = 0 'False
- Begin VB.CommandButton Delete
- Caption = "Delete"
- Height = 375
- Left = 4680
- TabIndex = 3
- Top = 600
- Width = 1215
- End
- Begin VB.TextBox xName
- DataField = "Name"
- DataSource = "Data1"
- Height = 495
- Left = 1560
- Locked = -1 'True
- TabIndex = 2
- Top = 360
- Width = 2175
- End
- Begin VB.Data Data1
- Connect = "Access"
- DatabaseName = "C:\pcplus\vbwkshp\issue159\newslist.mdb"
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 375
- Left = 1560
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "Recipients"
- Top = 1200
- Width = 1575
- End
- Begin VB.CommandButton OKButton
- Caption = "Exit"
- Height = 375
- Left = 4680
- TabIndex = 0
- Top = 120
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Name"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 480
- Width = 975
- End
- Attribute VB_Name = "DeleteRecipient"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Delete_Click()
- On Error GoTo A
- If xName.Text <> "" Then
- With Data1.Recordset
- .Delete
- .MoveNext
- End With
- End If
- Exit Sub
- MsgBox ("Database update failed")
- End Sub
- Private Sub Form_Activate()
- Data1.Refresh
- End Sub
- Private Sub OKButton_Click()
- Me.Hide
- End Sub
-