Dim de As String With Forms("供应商编辑").Controls("txname1") If .Value IsNot Nothing Then de = .Value With Tables("供应商表") Dim idx As Integer = Tables("供应商表").findRow("供应商公司 = '" & de & "'") If idx >= 0 Then Tables("供应商表").Current.Delete .Position = idx '则选择该行 Else Dim dr As Row = Tables("供应商表").AddNew dr("供应商公司") = de End If End With End If End With