📄 editreader.frm
字号:
VERSION 5.00
Begin VB.Form editreader
BorderStyle = 1 'Fixed Single
Caption = "正在修改读者信息"
ClientHeight = 5670
ClientLeft = 5355
ClientTop = 3360
ClientWidth = 5640
Icon = "editreader.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 5670
ScaleWidth = 5640
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 495
Left = 3600
TabIndex = 16
Top = 5040
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 495
Left = 120
TabIndex = 15
Top = 5040
Width = 1815
End
Begin VB.Frame Frame1
Caption = "读者信息修改"
Height = 4695
Left = 120
TabIndex = 0
Top = 120
Width = 5415
Begin VB.TextBox Text6
BackColor = &H8000000F&
Enabled = 0 'False
Height = 375
Left = 1320
TabIndex = 14
Top = 4080
Width = 2535
End
Begin VB.TextBox Text5
BackColor = &H00C0FFFF&
Height = 375
Left = 1320
TabIndex = 12
Top = 3480
Width = 3015
End
Begin VB.TextBox Text4
BackColor = &H00C0FFFF&
Height = 375
Left = 1320
TabIndex = 10
Top = 2880
Width = 3015
End
Begin VB.TextBox Text3
BackColor = &H00C0FFFF&
Height = 375
Left = 1320
TabIndex = 8
Top = 2280
Width = 2295
End
Begin VB.ComboBox Combo1
BackColor = &H00C0FFFF&
Height = 300
ItemData = "editreader.frx":2C14A
Left = 1320
List = "editreader.frx":2C154
TabIndex = 6
Top = 1680
Width = 1455
End
Begin VB.TextBox Text2
BackColor = &H00C0FFFF&
Height = 375
Left = 1320
TabIndex = 4
Top = 1080
Width = 1455
End
Begin VB.TextBox Text1
BackColor = &H8000000F&
Enabled = 0 'False
Height = 375
Left = 1320
TabIndex = 2
Top = 480
Width = 2295
End
Begin VB.Label Label7
Caption = "办证日期"
Height = 375
Left = 240
TabIndex = 13
Top = 4200
Width = 975
End
Begin VB.Label Label6
Caption = "家庭地址"
Height = 375
Left = 240
TabIndex = 11
Top = 3600
Width = 855
End
Begin VB.Label Label5
Caption = "所属单位"
Height = 375
Left = 240
TabIndex = 9
Top = 3000
Width = 855
End
Begin VB.Label Label4
Caption = "联系电话"
Height = 375
Left = 240
TabIndex = 7
Top = 2400
Width = 855
End
Begin VB.Label Label3
Caption = "读者性别"
Height = 375
Left = 240
TabIndex = 5
Top = 1800
Width = 855
End
Begin VB.Label Label2
Caption = "读者姓名"
Height = 375
Left = 240
TabIndex = 3
Top = 1200
Width = 855
End
Begin VB.Label Label1
Caption = "读者编号"
Height = 375
Left = 240
TabIndex = 1
Top = 600
Width = 735
End
End
End
Attribute VB_Name = "editreader"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
g_strsql = "select * from readerinfo where 读者编号='" & Text1.Text & "'"
Set g_rs = g_db.OpenRecordset(g_strsql)
g_rs.Edit
g_rs!读者姓名 = Text2.Text
g_rs!读者性别 = Combo1.Text
g_rs!联系电话 = Text3.Text
g_rs!所属单位 = Text4.Text
g_rs!家庭住址 = Text5.Text
g_rs.Update
Set g_rs = Nothing
MsgBox "数据修改成功,请返回!", vbInformation + vbOKOnly, "提示"
findreader.Adodc1.Refresh
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
dbl
findreader.DataGrid1.Col = 0
Text1.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 1
Text2.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 4
Text3.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 5
Text4.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 6
Text5.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 3
Text6.Text = findreader.DataGrid1.Text
findreader.DataGrid1.Col = 2
Combo1.Text = findreader.DataGrid1.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -