|
这样能够通过编译:
Private Sub Release_Status_AfterUpdate()
If Me.Release_Status = True Then
Me.Release_Date = Date
Else
Me.Release_Date = ""
End If
If MsgBox("pls, sure release this order ?", vbInformation + vbYesNo) = vbNo Then
Me.Release_Status = False
Exit Sub
End If
Dim DB As DAO.Database
Set DB = CurrentDb
Dim SQLText As String
Dim step As Integer
step = 1
SQLText = "INSERT INTO [PaiChan_REMOTE] (Team, Release_Date,Remark,CO_NO,Line_No,CO_Item,QTY,Serial_No,Desc,PROM_DATE,Release_Status)"
SQLText = SQLText + "SELECT Forms![paichan]![Team] AS [Team], Release_Date AS [Release_Date], Remark AS [Remark], CO_NO AS [CO_NO],Line_No as [Line_No],CO_Item as [CO_Item],qty as [qty],Serial_No as [Serial_No],Desc as [Desc],PROM_DATE as [PROM_DATE],Release_Status as [Release_Status];"
CurrentDb.Execute SQLText
Me.Release_Status.Locked = True
End Sub |
|