Private Sub Text7_AfterUpdate()
Dim sql As String
Dim conn As New ADODB.Connection
Set conn = CurrentProject.Connection
'查询是否发行过
If Not IsNull(DLookup("Checked", "IQC_Check", "YearZhou='" & Me.Text7 & "' and Checked=true")) Then '采用andymark兄给予的方法,在此感谢!
MsgBox "已发行过,请不要重复发行。若需重复操作,可向管理员寻求技术支持!"
Exit Sub
End If
'提取要发行的记录
sql = "UPDATE [IQC_Check CAR] SET [IQC_Check CAR].[Check] = True WHERE (([IQC_Check CAR].Ratio)> " & Me.Text3 & ") AND (([IQC_Check CAR].CheckTotal)>" & Me.Text8 & ") AND (([IQC_Check CAR].YearZhou)='" & Me.Text7 & "'));"
conn.Execute sql
Set conn = Nothing
End Sub
请看一下那里写错了?
[此贴子已经被作者于2006-7-18 14:13:40编辑过]
|