VB音像信息管理系统 第6页
If tb.RecordCount > 0 Then '从数据库中把用户名加入窗体的Combo1控件中
tb.MoveLast
tb.MoveFirst
For i = 0 To tb.RecordCount - 1
Combo1.AddItem tb.Fields("tname")
tb.MoveNext
Next i
Combo1.Text = yunhu
End If
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text1.Enabled = False
Label1.Enabled = False
DTPicker1.Enabled = False
Combo1.Enabled = False
Text1.Text = ""
Label1.Caption = ""
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Enabled = True
Label1.Enabled = False
DTPicker1.Enabled = False
Combo1.Enabled = False
Text1.Text = ""
Label1.Caption = ""
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text1.Enabled = False
Label1.Enabled = False
DTPicker1.Enabled = False
Combo1.Enabled = True
Text1.Text = ""
Label1.Caption = ""
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text1.Enabled = False
Label1.Enabled = True
DTPicker1.Enabled = True
Combo1.Enabled = False
Text1.Text = ""
Label1.Caption = ""
End If
End Sub
出售录入:
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox ("编号不能为空")
Exit Sub
End If
If Text2.Text = "" Or Text2.Text = "0" Then
MsgBox ("出售的数量不能为空值和零")
Exit Sub
End If
X = Len(Text2.Text)
For i = 1 To X
Y = Mid$(Text2.Text, i, 1)
If Asc(Y) > 57 Or Asc(Y) < 48 Then
MsgBox ("出售的数量不能为字符")
Exit Sub
End If
Next i
If Text3.Text = "" Or Text3.Text = "0" Then
MsgBox ("单价不能为空值和零")
Exit Sub
End If
X = Len(Text3.Text)
For i = 1 To X
Y = Mid$(Text3.Text, i, 1)
If (Asc(Y) > 57 Or Asc(Y) < 48) And Asc(Y) <> 46 Then
MsgBox ("单价不能为字符")
Exit Sub
End If
Next i
Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set tb = db.OpenRecordset("shujukbb", dbOpenDynaset)
tb.MoveLast
tb.MoveFirst
For i = 0 To tb.RecordCount - 1
If Text1.Text = tb.Fields("bianhao") Then
Exit For
Else
' MsgBox ("库中无此记录")
' GoTo tttt
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
VB音像信息管理系统 第6页下载如图片无法显示或论文不完整,请联系qq752018766