主要应用于学生管理

源代码在线查看: frmmodifyuserinfo.frm

软件大小: 77 K
上传用户: sgly2002
关键词: 应用于
下载地址: 免注册下载 普通下载 VIP

相关代码

				VERSION 5.00
				Begin VB.Form frmModifyuserinfo 
				   Caption         =   "修改密码"
				   ClientHeight    =   3096
				   ClientLeft      =   48
				   ClientTop       =   348
				   ClientWidth     =   4044
				   LinkTopic       =   "Form1"
				   ScaleHeight     =   3096
				   ScaleWidth      =   4044
				   StartUpPosition =   2  'CenterScreen
				   Begin VB.TextBox Text1 
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   492
				      IMEMode         =   3  'DISABLE
				      Index           =   1
				      Left            =   1920
				      PasswordChar    =   "*"
				      TabIndex        =   3
				      Top             =   360
				      Width           =   1572
				   End
				   Begin VB.TextBox Text1 
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   492
				      IMEMode         =   3  'DISABLE
				      Index           =   2
				      Left            =   1920
				      PasswordChar    =   "*"
				      TabIndex        =   2
				      Top             =   1080
				      Width           =   1572
				   End
				   Begin VB.CommandButton cmdOK 
				      Caption         =   "确认"
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   492
				      Left            =   840
				      TabIndex        =   1
				      Top             =   1800
				      Width           =   972
				   End
				   Begin VB.CommandButton cmdCancel 
				      Caption         =   "取消"
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   492
				      Left            =   2160
				      TabIndex        =   0
				      Top             =   1800
				      Width           =   972
				   End
				   Begin VB.Label Label2 
				      Caption         =   "请输入新密码"
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   372
				      Left            =   360
				      TabIndex        =   5
				      Top             =   480
				      Width           =   1452
				   End
				   Begin VB.Label Label3 
				      Caption         =   "请确认新密码"
				      BeginProperty Font 
				         Name            =   "宋体"
				         Size            =   10.8
				         Charset         =   0
				         Weight          =   700
				         Underline       =   0   'False
				         Italic          =   0   'False
				         Strikethrough   =   0   'False
				      EndProperty
				      Height          =   372
				      Left            =   360
				      TabIndex        =   4
				      Top             =   1200
				      Width           =   1452
				   End
				End
				Attribute VB_Name = "frmModifyuserinfo"
				Attribute VB_GlobalNameSpace = False
				Attribute VB_Creatable = False
				Attribute VB_PredeclaredId = True
				Attribute VB_Exposed = False
				
				Private Sub cmdCancel_Click()
				    Unload Me
				End Sub
				
				Private Sub cmdOK_Click()
				    Dim txtSQL, MsgText As String
				    Dim mrc As ADODB.Recordset
				    
				    If Trim(Text1(1).Text)  Trim(Text1(2).Text) Then
				        MsgBox "密码输入不正确!", vbOKOnly + vbExclamation, "警告"
				        Text1(1).SetFocus
				        Text1(1).Text = ""
				    Else
				        txtSQL = "select * from user_Info where user_ID = '" & UserName & "'"
				        Set mrc = ExecuteSQL(txtSQL, MsgText)
				        mrc.Fields(1) = Text1(1).Text
				        mrc.Update
				        mrc.Close
				        MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
				        Me.Hide
				        
				    End If
				        
				        
				End Sub
				
							

相关资源