form21.frm

来自「一套收费计算机系统」· FRM 代码 · 共 422 行

FRM
422
字号
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{E2690E23-9719-101B-9306-0020AF234C9D}#4.1#0"; "CSCMD32.OCX"
Begin VB.Form Form21 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "删除操作"
   ClientHeight    =   4380
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4425
   ControlBox      =   0   'False
   LinkTopic       =   "Form5"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4380
   ScaleWidth      =   4425
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Caption         =   "提示"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1935
      Left            =   2400
      TabIndex        =   14
      Top             =   120
      Width           =   1935
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   375
         Left            =   120
         Top             =   1320
         Visible         =   0   'False
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   661
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   2
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   2
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "FILE NAME=C:\My Documents\花寨子2000.udl"
         OLEDBString     =   ""
         OLEDBFile       =   "C:\My Documents\花寨子2000.udl"
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "用户库"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Label Label8 
         Caption         =   "确实要删除这条记录吗?如果是,请按确定键,否则,按取消键。"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1575
         Left            =   120
         TabIndex        =   15
         Top             =   240
         Width           =   1695
      End
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   12
      Top             =   3720
      Width           =   2775
   End
   Begin VB.TextBox Text6 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   3120
      Width           =   2775
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   8
      Top             =   2520
      Width           =   375
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   7
      Top             =   1920
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   4
      Top             =   1320
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   3
      Top             =   720
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   960
      Locked          =   -1  'True
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
   Begin CSCmdLibCtl.CSCmdBtn command2 
      Default         =   -1  'True
      Height          =   735
      Left            =   3480
      OleObjectBlob   =   "Form21.frx":0000
      TabIndex        =   17
      Top             =   2280
      Width           =   855
   End
   Begin CSCmdLibCtl.CSCmdBtn command1 
      Cancel          =   -1  'True
      Height          =   735
      Left            =   2400
      OleObjectBlob   =   "Form21.frx":094B
      TabIndex        =   18
      Top             =   2280
      Width           =   855
   End
   Begin VB.Label Label9 
      Caption         =   " "
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   16
      Top             =   2640
      Width           =   375
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      Caption         =   "备注:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   13
      Top             =   3840
      Width           =   855
   End
   Begin VB.Label Label6 
      Alignment       =   1  'Right Justify
      Caption         =   "地址:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   10
      Top             =   3240
      Width           =   855
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      Caption         =   "增装盒:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   9
      Top             =   2640
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "初装日期:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   6
      Top             =   2040
      Width           =   1095
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      Caption         =   "类型:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   5
      Top             =   1440
      Width           =   855
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   2
      Top             =   840
      Width           =   855
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "编号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   240
      Width           =   855
   End
End
Attribute VB_Name = "Form21"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim cnn2 As ADODB.Connection
Dim rstable2 As ADODB.Recordset
Dim strcnn2 As String
'Public txtstring As String

Private Sub command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
'rstable2.Delete adAffectCurrent
'rstable2.Update
'Unload Me

'adodc1.Recordset.Delete
'adodc1.Recordset.MoveNext
'adodc1.Recordset.Requery

'adodc1.Recordset.Update
Unload Me
End Sub


Private Sub Form_Load()
Dim chen, nong As String
'strcnn2 = "provider=microsoft.jet.oledb.3.51;data source=c:\my documents\花寨子早.mdb;" 'initial catalog=pubs;user id=zw;password=;"
'Set cnn2 = New ADODB.Connection
'cnn2.Open strcnn2
'Set rstable2 = New ADODB.Recordset
'rstable2.Open "用户库", cnn2, adOpenKeyset, adLockOptimistic, adCmdTable
'rstable2.MoveFirst
'rstable2.Find "编号 =" & txtstring, , adSearchForward, 1
Adodc1.Refresh
Adodc1.Recordset.Find "编号 ='" & txtstring & "'"

hzzde.rsonlyprice.Open
hzzde.rsonlyprice.MoveFirst
chen = hzzde.rsonlyprice.Fields(1).Value
hzzde.rsonlyprice.MoveLast
nong = hzzde.rsonlyprice.Fields(1).Value
hzzde.rsonlyprice.Close

If Not Adodc1.Recordset.EOF Then
  Text1.Text = Adodc1.Recordset.Fields(0).Value
  Text2.Text = Adodc1.Recordset.Fields(1).Value
  If Left(Text1.Text, 1) = "1" Then
    Text3.Text = chen
    Text3.BackColor = &HFF8080
  Else
    Text3.Text = nong
    Text3.BackColor = &H80FF80
  End If
  Text4.Text = Adodc1.Recordset.Fields(3).Value
  If Adodc1.Recordset.Fields(4).Value = False Then
    Text5.Text = "0"
    Label9.Caption = "无"
  Else
    Text5.Text = "-1"
    Label9.Caption = "有"
  End If
  Text6.Text = Adodc1.Recordset.Fields(2).Value
  If Not IsNull(Adodc1.Recordset.Fields(5).Value) Then
    Text7.Text = Adodc1.Recordset.Fields(5).Value
  Else
    Text7.Text = " "
  End If

Else
  MsgBox "输入有误,请按取消键重新开始删除操作", vbOKOnly, "警示"
End If

'Text1.Text = rstable2.Fields(0).Value
'Text2.Text = rstable2.Fields(1).Value
'If Left(Text1.Text, 1) = "1" Then
'  Text3.Text = "城市户"
'  Text3.BackColor = &HFF8080
'Else
'  Text3.Text = "农村户"
'  Text3.BackColor = &H80FF80
'End If
'Text4.Text = rstable2.Fields(3).Value
'If rstable2.Fields(4).Value = False Then
'  Text5.Text = "0"
'  Label9.Caption = "无"
'Else
'  Text5.Text = "-1"
'  Label9.Caption = "有"
'End If
'Text6.Text = rstable2.Fields(2).Value
'Text7.Text = rstable2.Fields(5).Value

End Sub

Private Sub Form_Unload(Cancel As Integer)
'rstable2.Close
'cnn2.Close
Adodc1.Recordset.Close
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?