1。将文本框改为组合框----方便输入数据以及防止输入不在表中的Sn值
2。按钮事件中加入下面代码
Dim rs As New adodb.Recordset
Dim cnn As New adodb.Connection
Dim strSql As String
Set cnn = CurrentProject.Connection
strSql = "select * from main where sn='" & Me.TXTSN & "'"
rs.Open strSql, cnn, adOpenKeyset, adLockOptimistic
With rs
.Fields("co") = True
.Update
End With
rs.Close
Set rs = Nothing
Set cnn = Nothing