📄 form_supplier1.frm
字号:
Height = 285
Index = 0
Left = 2040
TabIndex = 1
Top = 40
Visible = 0 'False
Width = 1935
End
Begin VB.Label lblLabels
Caption = "orgType:"
Height = 255
Index = 18
Left = 120
TabIndex = 36
Top = 5820
Visible = 0 'False
Width = 1815
End
Begin VB.Label lblLabels
Caption = "电子邮箱:"
Height = 255
Index = 17
Left = 120
TabIndex = 34
Top = 4545
Width = 1815
End
Begin VB.Label lblLabels
Caption = "amount3:"
Height = 255
Index = 16
Left = 120
TabIndex = 32
Top = 5180
Visible = 0 'False
Width = 1815
End
Begin VB.Label lblLabels
Caption = "amount2:"
Height = 255
Index = 15
Left = 120
TabIndex = 30
Top = 4860
Visible = 0 'False
Width = 1815
End
Begin VB.Label lblLabels
Caption = "amount1:"
Height = 255
Index = 14
Left = 120
TabIndex = 28
Top = 4540
Visible = 0 'False
Width = 1815
End
Begin VB.Label lblLabels
Caption = "税号:"
Height = 255
Index = 13
Left = 120
TabIndex = 26
Top = 4220
Width = 1815
End
Begin VB.Label lblLabels
Caption = "银行帐户:"
Height = 255
Index = 12
Left = 120
TabIndex = 24
Top = 3900
Width = 1815
End
Begin VB.Label lblLabels
Caption = "开户银行:"
Height = 255
Index = 11
Left = 120
TabIndex = 22
Top = 3580
Width = 1815
End
Begin VB.Label lblLabels
Caption = "联系人电话:"
Height = 255
Index = 10
Left = 120
TabIndex = 20
Top = 3260
Width = 1815
End
Begin VB.Label lblLabels
Caption = "联系人:"
Height = 255
Index = 9
Left = 120
TabIndex = 18
Top = 2940
Width = 1815
End
Begin VB.Label lblLabels
Caption = "传真:"
Height = 255
Index = 8
Left = 120
TabIndex = 16
Top = 2620
Width = 1815
End
Begin VB.Label lblLabels
Caption = "公司电话:"
Height = 255
Index = 7
Left = 120
TabIndex = 14
Top = 2300
Width = 1815
End
Begin VB.Label lblLabels
Caption = "邮政编码:"
Height = 255
Index = 6
Left = 120
TabIndex = 12
Top = 1980
Width = 1815
End
Begin VB.Label lblLabels
Caption = "所属地区:"
Height = 255
Index = 5
Left = 120
TabIndex = 10
Top = 1660
Width = 1815
End
Begin VB.Label lblLabels
Caption = "供应商地址:"
Height = 255
Index = 4
Left = 120
TabIndex = 8
Top = 1340
Width = 1815
End
Begin VB.Label lblLabels
Caption = "供应商简称:"
Height = 255
Index = 3
Left = 120
TabIndex = 6
Top = 1020
Width = 1815
End
Begin VB.Label lblLabels
Caption = "供应商全称:"
Height = 255
Index = 2
Left = 120
TabIndex = 4
Top = 700
Width = 1815
End
Begin VB.Label lblLabels
Caption = "供应商编号:"
Height = 255
Index = 1
Left = 120
TabIndex = 2
Top = 380
Width = 1815
End
Begin VB.Label lblLabels
Caption = "供应商Id:"
Height = 255
Index = 0
Left = 120
TabIndex = 0
Top = 60
Visible = 0 'False
Width = 1815
End
End
Attribute VB_Name = "form_supplier"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdAdd_Click()
Data1.Recordset.AddNew
' txtFields(1).SetFocus
End Sub
Private Sub cmdDelete_Click()
'this may produce an error if you delete the last
'record or the only record in the recordset
If MsgBox("真的要删除吗?", vbYesNo) = vbYes Then
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End If
End Sub
Private Sub cmdRefresh_Click()
'this is really only needed for multi user apps
Data1.Refresh
End Sub
Private Sub cmdUpdate_Click()
Data1.UpdateRecord
Data1.Recordset.Bookmark = Data1.Recordset.LastModified
MsgBox "保存成功!", vbInformation
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Data1_Error(DataErr As Integer, Response As Integer)
'This is where you would put error handling code
'If you want to ignore errors, comment out the next line
'If you want to trap them, add code here to handle them
MsgBox "Data error event hit err:" & Error$(DataErr)
Response = 0 'throw away the error
End Sub
Private Sub Data1_Reposition()
Screen.MousePointer = vbDefault
On Error Resume Next
'This will display the current record position
'for dynasets and snapshots
' Data1.Caption = "Record: " & (Data1.Recordset.AbsolutePosition + 1)
Data1.Caption = "第 " & (Data1.Recordset.AbsolutePosition + 1) & " 条记录!"
'for the table object you must set the index property when
'the recordset gets created and use the following line
'Data1.Caption = "Record: " & (Data1.Recordset.RecordCount * (Data1.Recordset.PercentPosition * 0.01)) + 1
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
'This is where you put validation code
'This event gets called when the following actions occur
Select Case Action
Case vbDataActionMoveFirst
Case vbDataActionMovePrevious
Case vbDataActionMoveNext
Case vbDataActionMoveLast
Case vbDataActionAddNew
Case vbDataActionUpdate
Case vbDataActionDelete
Case vbDataActionFind
Case vbDataActionBookmark
Case vbDataActionClose
End Select
Screen.MousePointer = vbHourglass
End Sub
Private Sub Form_Load()
' txtFields(1).SetFocus
Data1.DatabaseName = g_dbPath
Data1.RecordSource = "select * from hpos_organization where orgType=0"
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
Screen.MousePointer = vbDefault
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -