VB5.0中数据库查询模块的实现毕业论文(4)
2015-06-05 02:32
导读:End Sub Private Sub Option2_Click() 选定供货单位字段 (略) End Sub Private Sub Option3_Click() 选定供货日期字段Search_txt = 3Text1.Text = Text1.Text = Date 起始日期Text2.Text =
End Sub
Private Sub Option2_Click() ‘选定“供货单位”字段
(略)
End Sub
Private Sub Option3_Click() ‘选定“供货日期”字段Search_txt = 3Text1.Text = ""Text1.Text = Date ‘起始日期Text2.Text = Date ‘终止日期
Label2.Caption = "至"
Text2.Enabled = True
Text2.Visible = True
Text1.SetFocus
End Sub
Private Sub Option4_Click() ‘选定“到货数量”字段
Search_txt = 4
Text1.Text = ""
Text2.Text = ""
Text1.Text = Format(Text1.Text, "###,###,##0.00")‘设置字段格式为数值型
Text2.Text = Format(Text2.Text, "###,###,##0.00")‘设置字段格式为数值型
Label2.Caption = "至"
Text2.Enabled = True
Text2.Visible = True
Text1.SetFocus
End Sub
Private Sub Option5_Click() ‘选定“总金额”字段
(略)
End Sub
Private Sub Text1_LostFocus()
‘判断如果选定的是“供货日期”字段,text1的输入值必须是日期型的 If Search_txt = 3 Then
If Not IsDate(Text1.Text) Then
z = MsgBox(" 非法日期!请重新输入 !", vbCritical, "严重警告,输入无效 !")
Text1.SetFocus
End If
End If
End Sub
Private Sub Text2_LostFocus()
‘判断如果选定的是“供货日期”字段,text2的输入值必须是日期型的
If Search_txt = 3 Then
Text2.Text = Format(Text2.Text, "yyyy-mm-dd")
If Not IsDate(Text2.Text) Then
(科教论文网 lw.nseaC.Com编辑发布)
z = MsgBox(" 非法日期!请重新输入 !", vbCritical, "严重警告,输入无效 !")
Text2.SetFocus
End If
End If
End Sub