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

📄 frmmodifyroom.frm

📁 该系统的最终用户是访问本系统的工作人员
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Height          =   375
            Index           =   2
            Left            =   1800
            TabIndex        =   13
            Top             =   1560
            Width           =   1335
         End
         Begin VB.TextBox Textdong 
            BackColor       =   &H00C0E0FF&
            Height          =   375
            Index           =   1
            Left            =   1800
            TabIndex        =   12
            Top             =   960
            Width           =   1335
         End
         Begin VB.TextBox Textdong 
            BackColor       =   &H00C0E0FF&
            Height          =   375
            Index           =   0
            Left            =   1800
            TabIndex        =   9
            Top             =   360
            Width           =   1335
         End
         Begin VB.Label Label7 
            Caption         =   "寝室成员"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   7680
            TabIndex        =   20
            Top             =   240
            Width           =   1455
         End
         Begin VB.Label Label6 
            Caption         =   "电话"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   3960
            TabIndex        =   18
            Top             =   1560
            Width           =   1095
         End
         Begin VB.Label Label5 
            Caption         =   "专业"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   3840
            TabIndex        =   16
            Top             =   960
            Width           =   975
         End
         Begin VB.Label Label4 
            Caption         =   "学院"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   3840
            TabIndex        =   14
            Top             =   360
            Width           =   1095
         End
         Begin VB.Label Label3 
            Caption         =   "年级"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   840
            TabIndex        =   11
            Top             =   1560
            Width           =   975
         End
         Begin VB.Label Label2 
            Caption         =   "寝室号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   840
            TabIndex        =   10
            Top             =   960
            Width           =   855
         End
         Begin VB.Label Label1 
            Caption         =   "楼栋号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   840
            TabIndex        =   8
            Top             =   360
            Width           =   855
         End
      End
      Begin VB.Frame Frame1 
         Caption         =   "查看寝室成员信息"
         Height          =   1695
         Left            =   120
         TabIndex        =   2
         Top             =   720
         Width           =   9735
         Begin VB.CommandButton cmdquery 
            Caption         =   "查询"
            Height          =   495
            Left            =   8400
            TabIndex        =   49
            Top             =   240
            Width           =   1215
         End
         Begin VB.ComboBox Combo2 
            BackColor       =   &H00C0E0FF&
            Height          =   300
            Left            =   5880
            TabIndex        =   48
            Top             =   360
            Width           =   1215
         End
         Begin VB.CheckBox Check2 
            Caption         =   "输入寝室号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   4200
            TabIndex        =   47
            Top             =   360
            Width           =   1695
         End
         Begin VB.ComboBox Combo1 
            BackColor       =   &H00C0E0FF&
            Height          =   300
            ItemData        =   "frmmodifyroom.frx":0038
            Left            =   2160
            List            =   "frmmodifyroom.frx":005A
            TabIndex        =   46
            Top             =   360
            Width           =   1215
         End
         Begin VB.CheckBox Check1 
            Caption         =   "输入栋号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   840
            TabIndex        =   45
            Top             =   360
            Width           =   1335
         End
         Begin VB.CommandButton cmdlast 
            Caption         =   "最后一条纪录"
            Height          =   375
            Left            =   7320
            TabIndex        =   6
            Top             =   960
            Width           =   1455
         End
         Begin VB.CommandButton cmdNext 
            Caption         =   "下一条纪录"
            Height          =   375
            Left            =   5040
            TabIndex        =   5
            Top             =   960
            Width           =   1335
         End
         Begin VB.CommandButton cmdPrevious 
            Caption         =   "上一条纪录"
            Height          =   375
            Left            =   3000
            TabIndex        =   4
            Top             =   960
            Width           =   1335
         End
         Begin VB.CommandButton cmdfirst 
            Caption         =   "第一条纪录"
            Height          =   375
            Index           =   0
            Left            =   600
            MaskColor       =   &H80000011&
            Style           =   1  'Graphical
            TabIndex        =   3
            Top             =   960
            Width           =   1455
         End
      End
      Begin VB.Line Line5 
         X1              =   -74760
         X2              =   -69360
         Y1              =   4320
         Y2              =   4320
      End
      Begin VB.Line Line3 
         X1              =   -74760
         X2              =   -69360
         Y1              =   3240
         Y2              =   3240
      End
      Begin VB.Line Line2 
         X1              =   -74760
         X2              =   -69480
         Y1              =   3240
         Y2              =   3240
      End
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   7350
      Width           =   10455
      _ExtentX        =   18441
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   18389
            Text            =   "修改寝室成员信息"
            TextSave        =   "修改寝室成员信息"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmmodifyroom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim myBookmark As Variant
Dim mcclean As Boolean





 Private Sub addCommand_Click()
     Dim mrc As ADODB.Recordset
    Dim txtSQL As String
    Dim MsgText As String
   
   
    If Not Testtxt(Text1(0).Text) Then
        MsgBox "请输入楼栋号!", vbOKOnly + vbExclamation, "警告"
         Text1(0).SetFocus
        Exit Sub
    End If
    If Not IsNumeric(Trim(Text1(0).Text)) Then
        MsgBox "栋号请输入数字!", vbOKOnly + vbExclamation, "警告"
        Text1(0).Text = ""
        Text1(0).SetFocus
        Exit Sub
    End If
    If Not Testtxt(Text1(1).Text) Then
        MsgBox "请输入寝室号!", vbOKOnly + vbExclamation, "警告"
        Text1(1).SetFocus
        Exit Sub
    End If
    
    If Not Testtxt(Text1(2).Text) Then
        MsgBox "请输入年级!", vbOKOnly + vbExclamation, "警告"
        Text1(2).SetFocus
        Exit Sub
    End If
    
    If Not Testtxt(Text1(3).Text) Then
        MsgBox "请输入学院名!", vbOKOnly + vbExclamation, "警告"
        Text1(3).SetFocus
        Exit Sub
    End If
    
    If Not Testtxt(Text1(4).Text) Then
        MsgBox "请选择你的专业名!", vbOKOnly + vbExclamation, "警告"
        Text1(4).SetFocus
        Exit Sub
    End If
    
    If Not Testtxt(Text1(5).Text) Then
        MsgBox "请输入联系电话!", vbOKOnly + vbExclamation, "警告"
        Text1(5).SetFocus
        Exit Sub
    ElseIf Not IsNumeric(Trim(Text1(5).Text)) Then
        MsgBox "电话号码请输入数字!", vbOKOnly + vbExclamation, "警告"
        Text1(5).SetFocus
        Exit Sub
    ElseIf Len(Trim(Text1(5))) <> 7 Then
           MsgBox "输入电话号码不正确", vbOKOnly + vbExclamation, "警告"
          
           Text1(5).SetFocus
           Exit Sub
     
    End If
    
    
    If Not Testtxt(Text2.Text) Then
        MsgBox "请输入寝室成员信息!", vbOKOnly + vbExclamation, "警告"
        Text2.SetFocus
        Exit Sub
    End If
    
    
    
    
    
    
    txtSQL = "select * from reward_punish where 栋号 = '" & Trim(Text1(0).Text) & "'  and 寝室号= '" & Trim(Text1(1).Text) & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = False Then
        MsgBox "这个寝室已存在,请重新输入!", vbOKOnly + vbExclamation, "警告"
        mrc.Close
      
       Text1(0).Text = ""
       Text1(0).SetFocus
    Else
        mrc.Close
        
              

⌨️ 快捷键说明

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