📄 frmbmbm.frm
字号:
VERSION 5.00
Begin VB.Form frmBmbm
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "编码维护---部门编码"
ClientHeight = 1965
ClientLeft = 1095
ClientTop = 330
ClientWidth = 6975
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1965
ScaleWidth = 6975
StartUpPosition = 1 '所有者中心
Begin VB.Frame Framefields
Caption = " "
Enabled = 0 'False
Height = 1215
Left = 840
TabIndex = 17
Top = 120
Width = 5415
Begin VB.ListBox ListHelpBmbm
BackColor = &H00C0FFFF&
Height = 420
Left = 2040
TabIndex = 21
Top = 720
Visible = 0 'False
Width = 3015
End
Begin VB.TextBox txtFields
DataField = "部门编码"
Height = 285
Index = 0
Left = 2040
TabIndex = 0
Top = 420
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "部门名称"
Height = 285
Index = 1
Left = 2040
TabIndex = 1
Top = 735
Width = 3375
End
Begin VB.Label lblLabels
Caption = "部门编码: **"
Height = 255
Index = 0
Left = 120
TabIndex = 20
Top = 420
Width = 1815
End
Begin VB.Label lblLabels
Caption = "部门名称: **"
Height = 255
Index = 1
Left = 120
TabIndex = 19
Top = 735
Width = 1815
End
Begin VB.Label Label1
Caption = "注意:带**号的字段不能为空"
Height = 255
Left = 120
TabIndex = 18
Top = 0
Width = 2655
End
End
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 6975
TabIndex = 16
Top = 1365
Width = 6975
Begin VB.CommandButton cmdUpdate
Caption = "保存(&S)"
Height = 300
Left = 1920
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 300
Left = 5160
TabIndex = 9
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新(&R)"
Height = 300
Left = 4080
TabIndex = 8
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdEdit
Caption = "修改(&E)"
Height = 300
Left = 1920
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "添加(&A)"
Height = 300
Left = 840
TabIndex = 14
Top = 0
Width = 1095
End
Begin VB.CommandButton CmdContinueAdd
Caption = "继续(&J)"
Height = 300
Left = 840
TabIndex = 2
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdQuery
Caption = "查询(&Q)"
Height = 300
Left = 3000
TabIndex = 7
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 300
Left = 3000
TabIndex = 4
Top = 0
Visible = 0 'False
Width = 1095
End
End
Begin VB.PictureBox picStatBox
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 6975
TabIndex = 5
Top = 1665
Width = 6975
Begin VB.CommandButton cmdLast
Height = 300
Left = 5880
Picture = "frmBmbm.frx":0000
Style = 1 'Graphical
TabIndex = 13
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdNext
Height = 300
Left = 5520
Picture = "frmBmbm.frx":0192
Style = 1 'Graphical
TabIndex = 12
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdPrevious
Height = 300
Left = 1200
Picture = "frmBmbm.frx":0324
Style = 1 'Graphical
TabIndex = 11
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdFirst
Height = 300
Left = 840
Picture = "frmBmbm.frx":04B6
Style = 1 'Graphical
TabIndex = 10
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.Label lblStatus
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 285
Left = 1560
TabIndex = 15
Top = 0
Width = 3945
End
End
End
Attribute VB_Name = "frmBmbm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mbChangedByCode As Boolean
Dim mvBookMarkE As Variant
Dim mvBookMarkA As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Dim rsBmbm As Recordset
Dim rsBmbm1 As Recordset
Dim opAdded As Boolean
Dim opEdited As Boolean
'继续添加
Private Sub CmdContinueAdd_Click()
cmdUpdate_Click
Dim i As Integer
Dim FieldsValue(0 To 1) As String
For i = 0 To 1
FieldsValue(i) = txtFields(i).Text
Next i
cmdAdd_Click
For i = 0 To 1
txtFields(i).Text = FieldsValue(i)
Next i
End Sub
'查询
Private Sub CmdQuery_Click()
Me.Hide
frmbmBmcx.Show
End Sub
'保证双击打开编码维护界面后的当前记录为双击CELL时对应的记录
Private Sub Form_Activate()
If Me.Tag <> "" Then
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find ("部门编码='" & Me.Tag & "'")
End If
End Sub
Private Sub Form_Click()
ListHelpBmbm.Visible = False
End Sub
Private Sub Form_Load()
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select 部门编码,部门名称 from BMBM Order by 部门编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsBmbm = New Recordset
rsBmbm.Open "select 部门编码,部门名称 from BMBM Order by 部门编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsBmbm1 = New Recordset
rsBmbm1.Open "select 部门编码,部门名称 from BMBM Order by 部门编码", dblgjx, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'绑定文本框到数据提供者
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
opEdited = False
opAdded = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -