home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161b.iso / handson / archive / Issue159 / files / vbwkshp / DeleteRecipient.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-02  |  2.4 KB  |  87 lines

  1. VERSION 5.00
  2. Begin VB.Form DeleteRecipient 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Delete Recipent"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   2760
  7.    ClientTop       =   3750
  8.    ClientWidth     =   6030
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   3195
  13.    ScaleWidth      =   6030
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.CommandButton Delete 
  16.       Caption         =   "Delete"
  17.       Height          =   375
  18.       Left            =   4680
  19.       TabIndex        =   3
  20.       Top             =   600
  21.       Width           =   1215
  22.    End
  23.    Begin VB.TextBox xName 
  24.       DataField       =   "Name"
  25.       DataSource      =   "Data1"
  26.       Height          =   495
  27.       Left            =   1560
  28.       Locked          =   -1  'True
  29.       TabIndex        =   2
  30.       Top             =   360
  31.       Width           =   2175
  32.    End
  33.    Begin VB.Data Data1 
  34.       Connect         =   "Access"
  35.       DatabaseName    =   "C:\pcplus\vbwkshp\issue159\newslist.mdb"
  36.       DefaultCursorType=   0  'DefaultCursor
  37.       DefaultType     =   2  'UseODBC
  38.       Exclusive       =   0   'False
  39.       Height          =   375
  40.       Left            =   1560
  41.       Options         =   0
  42.       ReadOnly        =   0   'False
  43.       RecordsetType   =   1  'Dynaset
  44.       RecordSource    =   "Recipients"
  45.       Top             =   1200
  46.       Width           =   1575
  47.    End
  48.    Begin VB.CommandButton OKButton 
  49.       Caption         =   "Exit"
  50.       Height          =   375
  51.       Left            =   4680
  52.       TabIndex        =   0
  53.       Top             =   120
  54.       Width           =   1215
  55.    End
  56.    Begin VB.Label Label1 
  57.       Caption         =   "Name"
  58.       Height          =   255
  59.       Left            =   120
  60.       TabIndex        =   1
  61.       Top             =   480
  62.       Width           =   975
  63.    End
  64. Attribute VB_Name = "DeleteRecipient"
  65. Attribute VB_GlobalNameSpace = False
  66. Attribute VB_Creatable = False
  67. Attribute VB_PredeclaredId = True
  68. Attribute VB_Exposed = False
  69. Option Explicit
  70. Private Sub Delete_Click()
  71. On Error GoTo A
  72. If xName.Text <> "" Then
  73.     With Data1.Recordset
  74.         .Delete
  75.         .MoveNext
  76.     End With
  77. End If
  78. Exit Sub
  79. MsgBox ("Database update failed")
  80. End Sub
  81. Private Sub Form_Activate()
  82. Data1.Refresh
  83. End Sub
  84. Private Sub OKButton_Click()
  85. Me.Hide
  86. End Sub
  87.