📄 frmenterguanggao.frm
字号:
Caption = "播出费用:"
Height = 255
Left = 960
TabIndex = 10
Top = 3000
Width = 1215
End
Begin VB.Label Label10
Caption = "折扣金额:"
Height = 255
Left = 5280
TabIndex = 9
Top = 2520
Width = 975
End
Begin VB.Label Label9
Caption = "投放金额:"
Height = 255
Left = 960
TabIndex = 8
Top = 2520
Width = 1215
End
Begin VB.Label Label8
Caption = "其他费用:"
Height = 255
Left = 5280
TabIndex = 7
Top = 2040
Width = 975
End
Begin VB.Label Label7
Caption = "刊列金额:"
Height = 255
Left = 960
TabIndex = 6
Top = 2040
Width = 1215
End
Begin VB.Label Label6
Caption = "投放时段:"
Height = 255
Left = 5280
TabIndex = 5
Top = 1560
Width = 975
End
Begin VB.Label Label5
Caption = "投放次数:"
Height = 255
Left = 960
TabIndex = 4
Top = 1560
Width = 1215
End
Begin VB.Label Label4
Caption = "广告类别:"
Height = 255
Left = 5280
TabIndex = 3
Top = 1080
Width = 975
End
Begin VB.Label Label3
Caption = " 频 道:"
Height = 255
Left = 960
TabIndex = 2
Top = 1080
Width = 1095
End
Begin VB.Label Label2
Caption = "相关协议号:"
Height = 255
Left = 5280
TabIndex = 1
Top = 600
Width = 1095
End
Begin VB.Label Label1
Caption = "合同草稿号:"
Height = 255
Left = 840
TabIndex = 0
Top = 600
Width = 1215
End
End
Attribute VB_Name = "frmenterguanggao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Trim(Text1.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text1.SetFocus
Exit Sub
End If
If Trim(Text2.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text2.SetFocus
Exit Sub
End If
If Trim(Text3.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text3.SetFocus
Exit Sub
End If
If Trim(Text4.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text4.SetFocus
Exit Sub
End If
If Trim(Text5.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text5.SetFocus
Exit Sub
End If
If Trim(Text6.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text6.SetFocus
Exit Sub
End If
If Trim(Text7.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text7.SetFocus
Exit Sub
End If
If Trim(Text8.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text8.SetFocus
Exit Sub
End If
If Trim(Text9.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text9.SetFocus
Exit Sub
End If
If Trim(Text10.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text10.SetFocus
Exit Sub
End If
If Trim(Text11.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text11.SetFocus
Exit Sub
End If
If Trim(Text12.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text12.SetFocus
Exit Sub
End If
If Trim(Text13.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text13.SetFocus
Exit Sub
End If
If Trim(Text14.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text14.SetFocus
Exit Sub
End If
If Trim(MaskEdBox1.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text15.SetFocus
Exit Sub
End If
If Trim(MaskEdBox2.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text16.SetFocus
Exit Sub
End If
If Trim(MaskEdBox3.Text) = "" Then
msg = MsgBox("请完整输入完整", 16, "错误")
Text17.SetFocus
Exit Sub
End If
If IsNumeric(Text5.Text) = False Then
msg = MsgBox("投放次数必须是数字", 16, "错误")
Text5.SetFocus
Exit Sub
End If
If IsNumeric(Text7.Text) = False Then
msg = MsgBox("刊列金额必须是数字", 16, "错误")
Text7.SetFocus
Exit Sub
End If
If IsNumeric(Text8.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text8.SetFocus
Exit Sub
End If
If IsNumeric(Text9.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text9.SetFocus
Exit Sub
End If
If IsNumeric(Text10.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text10.SetFocus
Exit Sub
End If
If IsNumeric(Text11.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text11.SetFocus
Exit Sub
End If
If IsNumeric(Text12.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text12.SetFocus
Exit Sub
End If
If IsNumeric(Text13.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text13.SetFocus
Exit Sub
End If
If IsNumeric(Text14.Text) = False Then
msg = MsgBox("金额必须是数字", 16, "错误")
Text14.SetFocus
Exit Sub
End If
If IsNumeric(Left(MaskEdBox1.Text, 4)) = False Then
msg = MsgBox("年份必须是数字", 16, "错误")
MaskEdBox1.SetFocus
Exit Sub
End If
If IsNumeric(Left(MaskEdBox2.Text, 4)) = False Then
msg = MsgBox("年份必须是数字", 16, "错误")
MaskEdBox2.SetFocus
Exit Sub
End If
If IsNumeric(Left(MaskEdBox3.Text, 4)) = False Then
msg = MsgBox("年份必须是数字", 16, "错误")
MaskEdBox3.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox1.Text, 6, 2)) = False Then
msg = MsgBox("月份必须是数字", 16, "错误")
MaskEdBox1.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox2.Text, 6, 2)) = False Then
msg = MsgBox("月份必须是数字", 16, "错误")
MaskEdBox2.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox3.Text, 6, 2)) = False Then
msg = MsgBox("月份必须是数字", 16, "错误")
MaskEdBox3.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox1.Text, 9, 2)) = False Then
msg = MsgBox("日必须是数字", 16, "错误")
MaskEdBox1.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox2.Text, 9, 2)) = False Then
msg = MsgBox("日必须是数字", 16, "错误")
MaskEdBox2.SetFocus
Exit Sub
End If
If IsNumeric(Mid(MaskEdBox3.Text, 9, 2)) = False Then
msg = MsgBox("日必须是数字", 16, "错误")
MaskEdBox3.SetFocus
Exit Sub
End If
If Mid(MaskEdBox1.Text, 6, 2) > 12 Or Mid(MaskEdBox1.Text, 6, 2) < 1 Then
msg = MsgBox("月份不正确", 16, "错误")
MaskEdBox1.SetFocus
Exit Sub
End If
If Mid(MaskEdBox2.Text, 6, 2) > 12 Or Mid(MaskEdBox2.Text, 6, 2) < 1 Then
msg = MsgBox("月份不正确", 16, "错误")
MaskEdBox2.SetFocus
Exit Sub
End If
If Mid(MaskEdBox3.Text, 6, 2) > 12 Or Mid(MaskEdBox3.Text, 6, 2) < 1 Then
msg = MsgBox("月份不正确", 16, "错误")
MaskEdBox3.SetFocus
Exit Sub
End If
If Mid(MaskEdBox1.Text, 9, 2) > 31 Or Mid(MaskEdBox1.Text, 9, 2) < 1 Then
msg = MsgBox("日期不正确", 16, "错误")
MaskEdBox1.SetFocus
Exit Sub
End If
If Mid(MaskEdBox2.Text, 9, 2) > 31 Or Mid(MaskEdBox2.Text, 9, 2) < 1 Then
msg = MsgBox("月份不正确", 16, "错误")
MaskEdBox2.SetFocus
Exit Sub
End If
If Mid(MaskEdBox3.Text, 9, 2) > 31 Or Mid(MaskEdBox3.Text, 9, 2) < 1 Then
msg = MsgBox("月份不正确", 16, "错误")
MaskEdBox3.SetFocus
Exit Sub
End If
Dim sql As String
Dim str As String
Dim con As ADODB.Connection
Set con = New Connection
str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select * from [hetong] where hetong_no='" & Trim(Text1.Text) & "' or xgxy_no='" & Trim(Text2.Text) & "'"
rs.Open sql, con, 1, 1
If Not rs.EOF Then
msg = MsgBox("对不起,数据库中已有相同的合同草稿号或相同的相关协议号", 16, "错误")
Exit Sub
End If
con.Execute "insert into [hetong]([hetong_no],[xgxy_no],[pingdao],[leibie],[playnumber],[playtime],[money],[othermoney],[playmoney],[sulemoney],[bochumoney],[weiyuemoney],[allmoney],[moneymoeny],[qianyue_date],[start_date],[end_date],[whoown],[otherinfo]) values('" & Trim(Text1.Text) & "','" & Trim(Text2.Text) & "','" & Trim(Text3.Text) & "','" & Trim(Text4.Text) & "','" & Trim(Text5.Text) & "','" & Trim(Text6.Text) & "','" & Trim(Text7.Text) & "','" & Trim(Text8.Text) & "','" & Trim(Text9.Text) & "','" & Trim(Text10.Text) & "','" & Trim(Text11.Text) & "','" & Trim(Text12.Text) & "','" & Trim(Text13.Text) & "','" & Trim(Text14.Text) & "','" & Trim(MaskEdBox1.Text) & "','" & Trim(MaskEdBox2.Text) & "','" & Trim(MaskEdBox3.Text) & "','" & Trim(Text18.Text) & "','" & Trim(Text15.Text) & "')"
con.Close
Set con = Nothing
msg = MsgBox("恭喜!新的合同记录已加入!", 64, "信息")
Unload Me
frmmain.Show
End Sub
Private Sub Command2_Click()
Unload Me
frmenterguanggao.Show
frmmain.Hide
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text18.Text = frmLogin.username
Text18.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -