📄 main_zjkh.frm
字号:
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 8
Top = 720
Width = 1095
End
Begin VB.Label Label1
Caption = "客户编号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 7
Top = 240
Width = 1215
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = " 传真 : 电话 :"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 5640
TabIndex = 6
Top = 2760
Width = 840
End
Begin VB.Label Label3
Caption = "邮政编码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 5640
TabIndex = 5
Top = 2160
Width = 1020
End
Begin VB.Label Label2
Caption = "业务联系人:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 120
TabIndex = 2
Top = 3000
Width = 1185
End
End
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 345
Left = 240
TabIndex = 16
Top = 5040
Width = 1575
_ExtentX = 2778
_ExtentY = 609
_Version = 393216
Format = 25427969
CurrentDate = 38339
End
Begin MSAdodcLib.Adodc Adodc4
Height = 375
Left = 7800
Top = 5880
Width = 2055
_ExtentX = 3625
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from bdwxx"
Caption = "Adodc4"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc3
Height = 405
Left = 5520
Top = 5880
Width = 2145
_ExtentX = 3784
_ExtentY = 714
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from sfmc"
Caption = "Adodc3"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 3000
Top = 5880
Width = 2175
_ExtentX = 3836
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from csmc"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 7680
Top = 5040
Width = 2295
_ExtentX = 4048
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from kh"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "main_zjkh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer
Private Sub Form_Load()
DTPicker1.Value = Date
For i = 1 To 15
kh(i).Enabled = False
Next i
Adodc3.RecordSource = "select * from sfmc"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Adodc3.Recordset.MoveFirst
Do While Adodc3.Recordset.EOF = False
Combo1.AddItem (Adodc3.Recordset.Fields("省份名称"))
Adodc3.Recordset.MoveNext
Loop
Else
End If
Adodc2.RecordSource = "select * from csmc"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo2.AddItem (Adodc2.Recordset.Fields("城市名称"))
Adodc2.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub ComSave_Click()
If kh(0) <> "" And kh(1) <> "" Then
Dim DWMC, YZBM As String
Adodc4.RecordSource = "select * from bdwxx"
Adodc4.Refresh
If Adodc4.Recordset.RecordCount > 0 Then
DWMC = Adodc4.Recordset.Fields("单位名称")
YZBM = Adodc4.Recordset.Fields("邮政编码")
Else
End If
Adodc1.Recordset.Fields("单位名称") = DWMC
Adodc1.Recordset.Fields("单位邮政编码") = YZBM
Adodc1.Recordset.Fields("日期") = DTPicker1.Value
If Combo1.Text = "" Or Combo2.Text = "" Then
Else
Adodc1.Recordset.Fields("所属地区") = Combo1.Text & Combo2.Text
End If
Adodc1.Recordset.Update
Adodc1.Refresh
'Adodc1.Refresh
MsgBox "数据保存成功!", , "保存信息提示"
ComSave.Enabled = False
ComCancel.Enabled = False
ComAdd.Enabled = True
For i = 1 To 15
kh(i).Enabled = False
Next i
Else
MsgBox ("客户全称不能为空!")
SSTab1.Tab = 0
kh(1).SetFocus
End If
End Sub
Private Sub ComAdd_Click()
Adodc1.RecordSource = "kh"
Adodc1.Refresh
For i = 0 To 15
kh(i).Enabled = True
kh(i).Text = ""
Adodc1.RecordSource = "select * from kh order by 客户编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
kh(0).Text = "1"
Else
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
kh(0).Text = Adodc1.Recordset.RecordCount
End If
Next i
ComSave.Enabled = True
ComCancel.Enabled = True
ComAdd.Enabled = False
SSTab1.Tab = 0
kh(1).SetFocus
End Sub
Private Sub ComCancel_Click()
Adodc1.Recordset.CancelUpdate
Adodc1.Refresh
For i = 0 To 15
kh(i).Enabled = False
kh(i).Text = ""
Next i
ComSave.Enabled = False
ComCancel.Enabled = False
ComAdd.Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
Frm_main.Enabled = True
End Sub
Private Sub ComEnd_Click()
Frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -