📄 frmdzupdate.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmdzupdate
BorderStyle = 3 'Fixed Dialog
Caption = "读者信息修改"
ClientHeight = 5025
ClientLeft = 45
ClientTop = 330
ClientWidth = 10335
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5025
ScaleWidth = 10335
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 3600
Top = 4440
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from dzxxtb"
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.CommandButton Command4
Caption = "保存退出"
Height = 375
Left = 7680
TabIndex = 14
Top = 4440
Width = 1455
End
Begin VB.CommandButton Command3
Caption = "修 改"
Height = 375
Left = 5760
TabIndex = 13
Top = 4440
Width = 1455
End
Begin VB.Frame Frame1
Height = 4095
Left = 120
TabIndex = 0
Top = 120
Width = 10095
Begin VB.Frame Frame2
Height = 3855
Left = 120
TabIndex = 15
Top = 120
Width = 9855
Begin VB.TextBox Text10
Height = 1575
Left = 6360
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 12
Text = "frmdzupdate.frx":0000
Top = 2160
Width = 3375
End
Begin VB.TextBox Text6
Height = 270
Left = 2040
TabIndex = 7
Top = 1440
Width = 2535
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 255
Left = 6360
TabIndex = 8
Top = 1440
Width = 2535
_ExtentX = 4471
_ExtentY = 450
_Version = 393216
Format = 24576001
CurrentDate = 38307
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 255
Left = 2040
TabIndex = 5
Top = 1080
Width = 2535
_ExtentX = 4471
_ExtentY = 450
_Version = 393216
Format = 24576001
CurrentDate = 38307
End
Begin VB.TextBox Text9
Height = 270
Left = 2040
TabIndex = 11
Top = 2160
Width = 2535
End
Begin VB.TextBox Text8
Height = 270
Left = 6360
TabIndex = 10
Top = 1800
Width = 2535
End
Begin VB.TextBox Text7
Height = 270
Left = 2040
TabIndex = 9
Top = 1800
Width = 2535
End
Begin VB.TextBox Text5
Height = 270
Left = 6360
TabIndex = 6
Top = 1080
Width = 2535
End
Begin VB.TextBox Text4
Height = 270
Left = 6360
TabIndex = 4
Top = 720
Width = 2535
End
Begin VB.TextBox Text3
Height = 270
Left = 2040
TabIndex = 3
Top = 720
Width = 2535
End
Begin VB.TextBox Text2
Height = 270
Left = 6360
TabIndex = 2
Top = 360
Width = 2535
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 270
Left = 2040
TabIndex = 1
Top = 360
Width = 2535
End
Begin VB.Label Label14
Caption = "备 注:"
Height = 255
Left = 5280
TabIndex = 27
Top = 2160
Width = 975
End
Begin VB.Label Label11
Caption = "地 址:"
Height = 255
Left = 960
TabIndex = 26
Top = 2160
Width = 975
End
Begin VB.Label Label10
Caption = "Email :"
Height = 255
Left = 5280
TabIndex = 25
Top = 1800
Width = 975
End
Begin VB.Label Label9
Caption = "手 机:"
Height = 255
Left = 960
TabIndex = 24
Top = 1800
Width = 975
End
Begin VB.Label Label8
Caption = "登记日期:"
Height = 255
Left = 5280
TabIndex = 23
Top = 1440
Width = 975
End
Begin VB.Label Label7
Caption = "电话(夜):"
Height = 255
Left = 960
TabIndex = 22
Top = 1440
Width = 975
End
Begin VB.Label Label6
Caption = "电话(日):"
Height = 255
Left = 5280
TabIndex = 21
Top = 1080
Width = 975
End
Begin VB.Label Label5
Caption = "出生年月:"
Height = 255
Left = 960
TabIndex = 20
Top = 1080
Width = 975
End
Begin VB.Label Label4
Caption = "身份证号:"
Height = 255
Left = 5280
TabIndex = 19
Top = 720
Width = 975
End
Begin VB.Label Label3
Caption = "读者姓名:"
Height = 255
Left = 960
TabIndex = 18
Top = 720
Width = 975
End
Begin VB.Label Label2
Caption = "性 别:"
Height = 255
Left = 5280
TabIndex = 17
Top = 360
Width = 975
End
Begin VB.Label Label1
Caption = "读者编号:"
Height = 255
Left = 960
TabIndex = 16
Top = 360
Width = 975
End
End
End
End
Attribute VB_Name = "frmdzupdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As adodb.Connection
Dim rs As adodb.Recordset
Private Sub Command4_Click()
Dim dz, i As String
i = MsgBox("是否保存此条记录!", vbYesNo + vbOKOnly, "提示")
If i = vbYes Then
dz = "update dzxxtb set 读者编号='" & Text1 & "',性别='" & Text2 & "',读者姓名='" & Text3 & "',读者类别='" & Text4 & "',身份证号='" & Text5 & "',出生日期='" & DTPicker1 & "',电话日='" & Text6 & "',部门='" & Text7 & "',电话夜='" & Text8 & "',登记日期='" & DTPicker2 & "',手机='" & Text9 & "',Email='" & Text10 & "',地址='" & Text11 & "',备注='" & Text12 & "',未还本数='" & Text13 & "',借书次数='" & Text14 & "',超期天数='" & Text15 & "',照片='" & Image1 & "'where 读者编号 like '" & Text1.Text & "'"
cn.Execute (dz)
Else
rs.CancelUpdate
End If
frmdzgl.DataGrid1.Refresh
frmdzgl.Adodc1.Refresh
Me.Hide
End Sub
Private Sub Form_Activate()
Text1.Text = frmdzgl.Adodc1.Recordset.Fields(0)
Text2.Text = frmdzgl.Adodc1.Recordset.Fields(1)
Text3.Text = frmdzgl.Adodc1.Recordset.Fields(2)
Text4.Text = frmdzgl.Adodc1.Recordset.Fields(3)
DTPicker1.Value = frmdzgl.Adodc1.Recordset.Fields(4)
Text5.Text = frmdzgl.Adodc1.Recordset.Fields(5)
Text6.Text = frmdzgl.Adodc1.Recordset.Fields(6)
DTPicker2.Value = frmdzgl.Adodc1.Recordset.Fields(7)
Text7.Text = frmdzgl.Adodc1.Recordset.Fields(8)
Text8.Text = frmdzgl.Adodc1.Recordset.Fields(9)
Text9.Text = frmdzgl.Adodc1.Recordset.Fields(10)
Text10.Text = frmdzgl.Adodc1.Recordset.Fields(11)
End Sub
Private Sub Form_Load()
Set cn = New adodb.Connection
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
cn.Open
Set rs = New adodb.Recordset
rs.Open "select * from dzxxtb", cn, adOpenStatic, adLockOptimistic
Me.Caption = Me.Caption & " " & frmmain.StatusBar1.Panels(2).Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -