论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
如图(1):单项查询模块窗体图
2.2.3编写程序代码:
上述设计完成后,可以对窗体及控件的事件编写代码:
‘变量定义
Dim my_db As Database Dim my_dr As Recordset Dim Field_val1 As String Dim Field_val3 As Date
Dim Field_val32 As Date
Dim Field_val4 As Integer
Dim Field_val42 As Integer
Dim Search_txt As Integer
Private Sub Form_Load() Search_txt = 1 Text1.Text = "" Text2.Text = ""Label2.Caption = ""End Sub
Private Sub Command1_Click() ‘确定按钮 本文来自中国科教评价网
Select Case Search_txt
Case 1 ‘若选择“物资名称”
Field_val1 = Text1.Text
Set my_db = OpenDatabase("d:\zu_vb\in_db.mdb")