【文章內(nèi)容簡介】
temp = 0 sql = insert into newtb values(39。 amp。 Text1 amp。 39。,39。 amp。 DT1 amp。 39。,39。 amp。 Text2 amp。 39。,39。 amp。 Text3 amp。 39。,39。 amp。 Text4 amp。 39。,39。 amp。 Text5 amp。 39。,39。 amp。 DT2 amp。 39。,39。 amp。 Text6 amp。 39。,39。 amp。 Text7 amp。 39。, amp。 amp。 ,39。 amp。 Text9 amp。 39。,39。 amp。 Text10 amp。 39。,39。 amp。 Text11 amp。 39。,39。 amp。 Text12 amp。 39。,39。 amp。 Text13 amp。 39。,39。 amp。 temp amp。 39。) (sql) MsgBox 數(shù)據(jù)保存成功 !, 64 = select * from newtb where 是否驗(yàn)收 =39。039。 order by 訂單號 End If End If End If End Sub Private Sub Command2_Click() 交通運(yùn)輸學(xué)院課程設(shè)計(jì) 32 clear End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Command4_Click() If = False Then c = MsgBox(您確認(rèn)要?jiǎng)h除該記錄嗎 ?, 17) If c = vbOK Then Unload Me End If Else MsgBox 當(dāng)前數(shù)據(jù)庫中已經(jīng)沒有可刪除的記錄 , 64 End If End Sub Private Sub Command5_Click() clear Dim temp1 temp1 = Format(Now, yyyymmdd) = select * from newtb where 訂單 號 like 39。% + temp1 + %39。 order by 訂單號 If 0 Then = Val((訂單號 )) + 1 Else = temp1 + 0001 End If = select * from newtb where 是否驗(yàn)收 =39。039。 order by 訂單號 End Sub Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub DT1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then End If 交通運(yùn)輸學(xué)院課程設(shè)計(jì) 33 End Sub Private Sub DTPicker2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub DT2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then End Sub Private Sub Form_Activate() = = Dim temp1 temp1 = Format(Now, yyyymmdd) = select * from newtb where 訂單號 like 39。% + temp1 + %39。 order by 訂單號 If 0 Then = Val((訂單號 )) + 1 Else = temp1 + 0001 End If = select * from newtb where 是否驗(yàn)收 =39。039。 order by 訂單號 Set = Adodc2 clear End Sub Private Sub Form_Load() = amp。 amp。 (2).Text lbtb, n, adOpenStatic, adLockOptimistic, adCmdTable If 0 Then Do While = False (書籍類別 ) If Then Exit Do Loop End If clear = Date Set = Adodc2 End Sub 交通運(yùn)輸學(xué)院課程設(shè)計(jì) 34 Sub clear() = : = : = : = : = : = : = : = : = : = : = : = End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text3_LostFocus() If Not IsNumeric() Then Exit Sub Else MsgBox 書籍名稱不能為數(shù)字 , vbInformation = End If End Sub Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub text5_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text10_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then 交通運(yùn)輸學(xué)院課程設(shè)計(jì) 35 End Sub Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub frmupdate 源代碼 Dim rs1 As New Dim rs2 As New Private Sub bo1_Click() = select * from lbtb where 書籍類別 =39。 amp。 Trim() amp。 39。 If 0 Then = (2) End If End Sub Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Combo3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Command1_Click() Dim myval As String myval = MsgBox(是否驗(yàn)收訂單! , vbYesNo + vbOKOnly) If myval = vbYes Then (insert into rkb values(39。 amp。 Text1 amp。 39。,39。 amp。 DTPicker1 amp。 39。,39。 amp。 Text2 amp。 39。,39。 amp。 Text3 amp。 39。, amp。 Text4 amp。 ,39。 amp。 Text5 amp。 39。,39。 amp。 DTPicker2 amp。 39。,39。 amp。 Text6 amp。 39。, amp。 Text7 amp。 , amp。 amp。 , amp。 Text9 amp。 ,39。 amp。 Text10 amp。 39。, amp。 Text11 amp。 , amp。 Text12 amp。 , amp。 Text13 amp。 )) Dim rs As New select * from rkb, n, adOpenKeyset, adLockOptimistic 39。 If 0 Then (0) = (1) = (2) = Text2 交通運(yùn)輸學(xué)院課程設(shè)計(jì) 36 (3) = Text3 (4) = Text4 (5) = Text5 (6) = DTPicker2 (7) = Text6 (8) = Text7 (9) = (10) = Text9 (11) = Text10 (12) = Text11 (13) = Text12 (14) = Text13 MsgBox 驗(yàn)收成功! , vbInformation End If = select * from rkb = select * from newtb where 訂單號 =39。 + Text1 + 39。 and 是否驗(yàn)收 = 39。039。 If 0 Then (UPDATE newtb SET 是 否 驗(yàn) 收 = 39