Private Sub 运算_Click()
Dim rs As New ADODB.Recordset
Dim sql As String
Dim i As Long
Dim 单号 As String
sql = "select 订单号 from 表1"
rs.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
For i = 1 To rs.RecordCount
If IsNull(rs("订单号")) Then
rs("订单号") = 单号
rs.Update
Else
单号 = rs("订单号")
End If
rs.MoveNext
Next
rs.Close
Me.子窗体.Requery
End Sub