|
Private Sub cmdSave_Click()
If IsNull(Me.id) Or Me.id = "" Then
CurrentProject.Connection.Execute "INSERT INTO manage " & _
"(report, kdqr, lot, qty, date, remark, case, pn) VALUES (" & _
"'" & Me.report & "', '" & Me.kdqr & "','" & Me.lot & "','" & Me.qty & "',' " & Me.date & "','" & Me.remark & "',' Me.case & " ', '" & Me.pn & "')"
Else
CurrentProject.Connection.Execute "UPDATE manage " & _
"report = '" & Me.report & "', " & _
"kdqr = '" & Me.kdqr & "', " & _
"lot = '" & Me.lot & "', " & _
"qty = '" & Me.qty & "', " & _
"date = '" & Me.date & "', " & _
"remark = '" & Me.remark & "', " & _
"case = '" & Me.case & "', " & _
"pn = '" & Me.pn & "'," & _
" WHERE id=" & Me.id
End If
Call SetButt("保存")
End Sub |
|