📄 brxx.frm
字号:
VERSION 5.00
Begin VB.Form brxx
Caption = "病人基本信息"
ClientHeight = 7305
ClientLeft = 120
ClientTop = 435
ClientWidth = 10695
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 7305
ScaleWidth = 10695
WindowState = 2 'Maximized
Begin VB.TextBox Text4
DataField = "性别"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 19
Top = 2760
Width = 2895
End
Begin VB.TextBox Text3
DataField = "年龄"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 18
Top = 2160
Width = 2895
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "binren.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 480
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "bingren"
Top = 5040
Visible = 0 'False
Width = 1215
End
Begin VB.CommandButton Command8
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7440
TabIndex = 17
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command7
Caption = "删除"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5520
TabIndex = 16
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command6
Caption = "修改"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
TabIndex = 15
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command5
Caption = "添加"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1920
TabIndex = 14
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command4
Caption = "末记录"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 13
Top = 4680
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "下一条"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 12
Top = 3360
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "上一条"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 11
Top = 2040
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "首记录"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 10
Top = 720
Width = 1335
End
Begin VB.TextBox Text6
DataField = "电话"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 9
Top = 3960
Width = 2895
End
Begin VB.TextBox Text5
DataField = "地址"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 8
Top = 3360
Width = 2895
End
Begin VB.TextBox Text2
DataField = "病人编号"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 7
Top = 1560
Width = 2895
End
Begin VB.TextBox Text1
DataField = "姓名"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 1440
TabIndex = 6
Top = 960
Width = 2895
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "电话:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 5
Top = 4080
Width = 1455
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "地址:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 4
Top = 3480
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "性别:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 3
Top = 2880
Width = 1455
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "年龄:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 2
Top = 2280
Width = 1455
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 1
Top = 1680
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 375
Left = 240
TabIndex = 0
Top = 1080
Width = 1455
End
End
Attribute VB_Name = "brxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then Data1.Recordset.MoveFirst
End Sub
Private Sub Command3_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub
Private Sub Command4_Click()
Data1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
Command8.Enabled = Not Command8.Enabled
Command1.Enabled = Not Command1.Enabled
Command6.Enabled = Not Command6.Enabled
Command7.Enabled = Not Command7.Enabled
Command2.Enabled = Not Command2.Enabled
Command3.Enabled = Not Command3.Enabled
Command4.Enabled = Not Command4.Enabled
If Command5.Caption = "添加" Then '录入键单击后,键名改为“确认”
Command5.Caption = "确认"
Data1.Recordset.AddNew '在数据库表中加入新的信息
Text1.SetFocus
Else
Command5.Caption = "添加"
Data1.Recordset.Update
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command6_Click()
Command5.Enabled = Not Command5.Enabled
Command1.Enabled = Not Command1.Enabled
Command7.Enabled = Not Command7.Enabled
Command2.Enabled = Not Command2.Enabled
Command3.Enabled = Not Command3.Enabled
Command4.Enabled = Not Command4.Enabled
If Command6.Caption = "修改" Then
Command6.Caption = "确认"
Data1.Recordset.Edit
Text1.SetFocus
Else
Command6.Caption = "修改"
Data1.Recordset.Update '增加新的记录List1.AddItem "text1.text& text2.text"
End If
End Sub
Private Sub Command7_Click()
On Error Resume Next
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub
Private Sub Command8_Click()
Command7.Enabled = Not Command7.Enabled
Command2.Enabled = Not Command2.Enabled
Command3.Enabled = Not Command3.Enabled
Command4.Enabled = Not Command4.Enabled
Command8.Enabled = Not Command8.Enabled
Command1.Enabled = Not Command1.Enabled
Command6.Enabled = Not Command6.Enabled
Command5.Caption = "添加"
Data1.UpdateControls
Data1.Recordset.MoveLast
End Sub
Private Sub Form_Load()
Command8.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -