⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsadatezl.frm

📁 a sudent manamanger sysem
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSADateZL 
   Caption         =   "Students Admission From"
   ClientHeight    =   4755
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6915
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   4755
   ScaleWidth      =   6915
   Begin VB.Frame FrDHand 
      Caption         =   "Date Handling"
      Height          =   975
      Left            =   480
      TabIndex        =   17
      Top             =   3480
      Width           =   5895
      Begin VB.CommandButton cmdExit 
         Caption         =   "&Exit"
         Height          =   495
         Left            =   4440
         TabIndex        =   21
         Top             =   360
         Width           =   1335
      End
      Begin VB.CommandButton cmdSave 
         Caption         =   "&Save"
         Enabled         =   0   'False
         Height          =   495
         Left            =   3000
         TabIndex        =   20
         Top             =   360
         Width           =   1335
      End
      Begin VB.CommandButton cmdEdit 
         Caption         =   "&Edit"
         Height          =   495
         Left            =   1560
         TabIndex        =   19
         Top             =   360
         Width           =   1335
      End
      Begin VB.CommandButton cmdNew 
         Caption         =   "&New Admission"
         Height          =   495
         Left            =   120
         TabIndex        =   18
         Top             =   360
         Width           =   1335
      End
   End
   Begin VB.Frame frLReccord 
      Caption         =   "Reccord Navigation"
      Height          =   735
      Left            =   480
      TabIndex        =   12
      Top             =   2400
      Width           =   5895
      Begin VB.CommandButton cmdLast 
         Caption         =   ">>"
         Height          =   375
         Left            =   4560
         TabIndex        =   16
         ToolTipText     =   "Last Record"
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton cmdNext 
         Caption         =   ">"
         Height          =   375
         Left            =   3120
         TabIndex        =   15
         ToolTipText     =   "Next Record"
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton cmdPrevious 
         Caption         =   "<"
         Height          =   375
         Left            =   1680
         TabIndex        =   14
         ToolTipText     =   "Previous Record"
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton cmdFrist 
         Caption         =   "<<"
         Height          =   375
         Left            =   240
         TabIndex        =   13
         ToolTipText     =   "Frist Record"
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   270
      Index           =   5
      Left            =   4800
      TabIndex        =   11
      Top             =   1920
      Width           =   1575
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   270
      Index           =   4
      Left            =   1440
      TabIndex        =   10
      Top             =   1920
      Width           =   1455
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   975
      Index           =   3
      Left            =   4800
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   9
      Top             =   840
      Width           =   1575
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   270
      Index           =   2
      Left            =   1440
      TabIndex        =   8
      Top             =   840
      Width           =   1455
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   270
      Index           =   1
      Left            =   4800
      TabIndex        =   7
      Top             =   240
      Width           =   1575
   End
   Begin VB.TextBox txtFillRecord 
      Height          =   270
      Index           =   0
      Left            =   1440
      TabIndex        =   6
      Top             =   240
      Width           =   1455
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "Facuity Incharge:"
      Height          =   180
      Index           =   5
      Left            =   3120
      TabIndex        =   5
      Top             =   1920
      Width           =   1530
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "Batch:"
      Height          =   180
      Index           =   4
      Left            =   480
      TabIndex        =   4
      Top             =   1920
      Width           =   540
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Adress:"
      Height          =   180
      Index           =   3
      Left            =   3480
      TabIndex        =   3
      Top             =   840
      Width           =   630
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Age:"
      Height          =   180
      Index           =   2
      Left            =   630
      TabIndex        =   2
      Top             =   840
      Width           =   360
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "StudentName:"
      Height          =   180
      Index           =   1
      Left            =   3240
      TabIndex        =   1
      Top             =   240
      Width           =   1080
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "StudentID:"
      Height          =   180
      Index           =   0
      Left            =   435
      TabIndex        =   0
      Top             =   240
      Width           =   900
   End
End
Attribute VB_Name = "frmSADateZL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Cnn As ADODB.Recordset
Dim Cn As String
Dim Acc As Boolean

Private Sub cmdEdit_Click()
    TextEnable1
    TextK1
    cmdNew.Enabled = False
    cmdEdit.Enabled = False
    cmdSave.Enabled = True
    Acc = False
End Sub

Private Sub cmdExit_Click()
    If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "窗体退出") = vbOK Then
        Unload Me
    Else
        Exit Sub
    End If
End Sub

Private Sub cmdFrist_Click()
    If Cnn.RecordCount = 0 Then Exit Sub
    Cnn.MoveFirst
    FillText
End Sub

Private Sub cmdLast_Click()
    If Cnn.RecordCount = 0 Then Exit Sub
    Cnn.MoveLast
    FillText
End Sub

Private Sub cmdNew_Click()
    TextEnable1
    TextK
    cmdNew.Enabled = False
    cmdEdit.Enabled = False
    cmdSave.Enabled = True
    Acc = True
End Sub

Private Sub cmdNext_Click()
    If Cnn.RecordCount = 0 Then Exit Sub
    Cnn.MoveNext
    If Cnn.EOF = True Then
        MsgBox "纪录已是尾记录", vbOKOnly + vbExclamation, "浏览记录"
        Cnn.MoveLast
        FillText
    End If
    FillText
End Sub

Private Sub cmdPrevious_Click()
    If Cnn.RecordCount = 0 Then Exit Sub
    Cnn.MovePrevious
    If Cnn.BOF = True Then
        MsgBox "纪录已是首记录", vbOKOnly + vbExclamation, "浏览记录"
        Cnn.MoveFirst
        FillText
    End If
    FillText
End Sub

Private Sub cmdSave_Click()
    If Acc = True Then
        FillRecord
    Else
        FillRecord1
    End If
    cmdNew.Enabled = True
    cmdEdit.Enabled = True
    cmdSave.Enabled = False
    TextEnable
End Sub

Private Sub Form_Load()
    Set Cnn = New Recordset
    
    Cn = "select * from Admission"
    Cnn.Open Cn, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    frmSADateZL.Width = 7035
    frmSADateZL.Height = 5160
    FillText
    TextEnable
    Acc = False
End Sub

Private Sub FillText()
    Dim i As Integer
    If Cnn.RecordCount = 0 Then Exit Sub
    
    For i = 0 To 5
        txtFillRecord(i) = Cnn(i)
    Next
End Sub

Private Sub TextK()
    Dim i As Integer
    If Cnn.RecordCount = 0 Then Exit Sub
    
    For i = 0 To 5
        txtFillRecord(i) = ""
        txtFillRecord(0).SetFocus
    Next
End Sub

Private Sub TextK1()
    If Cnn.RecordCount = 0 Then Exit Sub
    txtFillRecord(0).SetFocus
End Sub
    
Private Sub FillRecord()
    Dim i As Integer
    Cnn.AddNew
    For i = 0 To 5
        Cnn(i) = txtFillRecord(i)
    Next
    Cnn.Update
    Cnn.MoveFirst
    FillText
End Sub

Private Sub FillRecord1()
    Dim i As Integer
    For i = 0 To 5
        Cnn(i) = txtFillRecord(i)
    Next
    Cnn.Update
    Cnn.MoveFirst
    FillText
End Sub

Private Sub TextEnable()
    Dim i As Integer
    For i = 0 To 5
        txtFillRecord(i).Enabled = False
    Next
End Sub

Private Sub TextEnable1()
    Dim i As Integer
    For i = 0 To 5
        txtFillRecord(i).Enabled = True
    Next
End Sub

⌨️ 快捷键说明

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