VB音像信息管理系统 第5页
ttable.Edit
Data1.DatabaseName = App.Path + "\shujuzunku.mdb"
Data1.RecordSource = "select * from tuser where tname='" + List1.Text + "'"
Data1.Refresh
Data1.Recordset.Delete
' ttable.Update
List1.RemoveItem (List1.ListIndex)
Else '不删除
End If
End If
xxxxx:
End Sub
Private Sub Command3_Click()
Unload Me
MDImain.Show
End Sub
Private Sub Form_Load()
adduserform.Width = 3960
adduserform.Height = 4740
adduserform.Top = 2000
adduserform.Left = 4000
Set tdatabase = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set ttable = tdatabase.OpenRecordset("tuser", dbOpenDynaset) '打开数据库和表
If ttable.RecordCount > 0 Then '从数据库中把用户名加入窗体的Combo1控件中
ttable.MoveLast
ttable.MoveFirst
For i = 0 To ttable.RecordCount - 1
List1.AddItem ttable.Fields("tname")
ttable.MoveNext
Next i
End If
List1.ListIndex = 0
End Sub
出售音像查询:
Private Sub Command1_Click()
If Option1.Value = True Then
Data1.DatabaseName = App.Path + "\shujuzunku.mdb"
Data1.RecordSource = "select bianhao as 编号,mingcheng as 名称,shuliang as 数量,danjia as 单价,chushouriqi as 出售日期,jingbanren as 经办人,beizhu as 备注 from chushou "
Data1.Refresh
End If
If Option2.Value = True Then
Data1.DatabaseName = App.Path + "\shujuzunku.mdb"
Data1.RecordSource = "select bianhao as 编号,mingcheng as 名称,shuliang as 数量,danjia as 单价,chushouriqi as 出售日期,jingbanren as 经办人,beizhu as 备注 from chushou where bianhao='" + Text1.Text + "'"
Data1.Refresh
End If
If Option4.Value = True Then
Data1.DatabaseName = App.Path + "\shujuzunku.mdb"
Data1.RecordSource = "select bianhao as 编号,mingcheng as 名称,shuliang as 数量,danjia as 单价,chushouriqi as 出售日期,jingbanren as 经办人,beizhu as 备注 from chushou where chushouriqi='" + Label1.Caption + "' "
Data1.Refresh
End If
If Option3.Value = True Then
Data1.DatabaseName = App.Path + "\shujuzunku.mdb"
Data1.RecordSource = "select bianhao as 编号,mingcheng as 名称,shuliang as 数量,danjia as 单价,chushouriqi as 出售日期,jingbanren as 经办人,beizhu as 备注 from chushou where jingbanren='" + Combo1.Text + "' "
Data1.Refresh
End If
If Data1.Recordset.RecordCount = 0 Then MSFlexGrid1.AddItem "无此条件的记录"
MSFlexGrid1.ColWidth(0) = 1500
MSFlexGrid1.ColWidth(1) = 2000
MSFlexGrid1.ColWidth(2) = 1200
MSFlexGrid1.ColWidth(3) = 1200
MSFlexGrid1.ColWidth(4) = 1500
MSFlexGrid1.ColWidth(5) = 1500
MSFlexGrid1.ColWidth(6) = 2200
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub DTPicker1_Change()
qq = DTPicker1.Value
If Mid$(qq, 3, 1) = "-" Then
qq = "20" + qq
Label1.Caption = qq
Else
Label1.Caption = DTPicker1.Value
End If
End Sub
Private Sub Form_Load()
chchaform.Left = 70
chchaform.Top = 1350
chchaform.Width = 11800
chchaform.Height = 6000
Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set tb = db.OpenRecordset("tuser", dbOpenDynaset) '打开数据库和表
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页