📄 frmdjbm.frm
字号:
VERSION 5.00
Begin VB.Form frmDJBM
BorderStyle = 3 'Fixed Dialog
Caption = "编码维护---到局编码"
ClientHeight = 1770
ClientLeft = 1095
ClientTop = 330
ClientWidth = 5775
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1770
ScaleWidth = 5775
StartUpPosition = 1 '所有者中心
Begin VB.ListBox ListHelpDjbm
BackColor = &H00C0FFFF&
Height = 420
Left = 2160
TabIndex = 20
Top = 720
Visible = 0 'False
Width = 3015
End
Begin VB.Frame Frame1
Caption = "Frame1"
Enabled = 0 'False
Height = 975
Left = 120
TabIndex = 16
Top = 120
Width = 5535
Begin VB.TextBox txtFields
DataField = "到局编码"
Height = 285
Index = 0
Left = 2040
TabIndex = 0
Top = 300
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "到局名称"
Height = 285
Index = 1
Left = 2040
TabIndex = 1
Top = 615
Width = 3375
End
Begin VB.Label lblLabels
Caption = "到局编码: **"
Height = 255
Index = 0
Left = 120
TabIndex = 19
Top = 300
Width = 1815
End
Begin VB.Label lblLabels
Caption = "到局名称: **"
Height = 255
Index = 1
Left = 120
TabIndex = 18
Top = 615
Width = 1815
End
Begin VB.Label Label1
Caption = "注意:带**号的字段不能为空,到局编码最多四位"
Height = 255
Left = 120
TabIndex = 17
Top = 0
Width = 4095
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 = 5775
TabIndex = 15
Top = 1170
Width = 5775
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 300
Left = 1200
TabIndex = 12
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 300
Left = 4675
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新(&R)"
Height = 300
Left = 3521
TabIndex = 5
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdQuery
Caption = "查询(&Q)"
Height = 300
Left = 2400
TabIndex = 4
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdEdit
Caption = "修改(&E)"
Height = 300
Left = 1213
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
Caption = "保存(&S)"
Height = 300
Left = 0
TabIndex = 11
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "添加(&A)"
Height = 300
Left = 59
TabIndex = 2
Top = 0
Width = 1035
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 = 5775
TabIndex = 13
Top = 1470
Width = 5775
Begin VB.CommandButton cmdLast
Height = 300
Left = 5400
Picture = "frmDJBM.frx":0000
Style = 1 'Graphical
TabIndex = 10
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdNext
Height = 300
Left = 5040
Picture = "frmDJBM.frx":0192
Style = 1 'Graphical
TabIndex = 9
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdPrevious
Height = 300
Left = 345
Picture = "frmDJBM.frx":0324
Style = 1 'Graphical
TabIndex = 8
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdFirst
Height = 300
Left = 0
Picture = "frmDJBM.frx":04B6
Style = 1 'Graphical
TabIndex = 7
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.Label lblStatus
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 285
Left = 690
TabIndex = 14
Top = 0
Width = 4320
End
End
End
Attribute VB_Name = "frmDJBM"
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 mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
'Dim NullWarnFlag As Boolean
Dim rsDjbm As Recordset
Dim rsDjbm1 As Recordset
'查询
Private Sub cmdQuery_Click()
Me.Hide
frmDjbmcx.Show
End Sub
'保证从查询界面切换到维护界面时当前记录的一致性
Private Sub Form_Activate()
If Me.Tag <> "" Then
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find ("到局编码='" & Me.Tag & "'")
End If
End Sub
Private Sub Form_Click()
ListHelpDjbm.Visible = False
End Sub
Private Sub Form_Load()
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select 到局编码,到局名称 from DJBM Order by 到局编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsDjbm = New Recordset
rsDjbm.Open "select 到局编码,到局名称 from DJBM order by 到局编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsDjbm1 = New Recordset
rsDjbm1.Open "select 到局编码,到局名称 from DJBM order by 到局编码", dblgjx, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'绑定文本框到数据提供者
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
End Sub
Private Sub Form_Resize()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -