📄 frmeditdoctor.frm
字号:
VERSION 5.00
Begin VB.Form frmeditdoctor
ClientHeight = 1860
ClientLeft = 60
ClientTop = 345
ClientWidth = 4350
Icon = "frmeditdoctor.frx":0000
LinkTopic = "Form1"
ScaleHeight = 1860
ScaleWidth = 4350
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消(&C)"
Height = 435
Left = 2910
TabIndex = 5
Top = 960
Width = 1245
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Default = -1 'True
Height = 435
Left = 2910
TabIndex = 4
Top = 360
Width = 1245
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1170
TabIndex = 3
Top = 960
Width = 1635
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 1170
TabIndex = 2
Top = 360
Width = 1635
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "医生姓名"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 120
TabIndex = 1
Top = 1020
Width = 840
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "医生编号"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 150
TabIndex = 0
Top = 420
Width = 840
End
End
Attribute VB_Name = "frmeditdoctor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入医生编号!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "请输入医生姓名!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
On Error GoTo err
If isxg = True Then
With frmdoctor.rsdoctor.Recordset
.Fields(0) = Text1.Text
.Fields(1) = Text2.Text
.Update
End With
ElseIf isxg = False Then
With frmdoctor.rsdoctor.Recordset
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Text2.Text
End With
End If
Exit Sub
err:
MsgBox err.Description, vbOKOnly + vbExclamation, "出错了:)"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
If isxg = True Then '修改医生记录
Text1.Text = frmdoctor.rsdoctor.Recordset.Fields(0).Value
Text2.Text = frmdoctor.rsdoctor.Recordset.Fields(1).Value
ElseIf isxg = False Then '增加医生记录
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -