Tables("现金银行").Current.Save() Dim str As String = Tables("现金银行").current("立帐编码") If str <> "" Then DataTables("应付").LoadFilter = "立帐编码='" & str & "'" DataTables("应收").LoadFilter = "立帐编码='" & str & "'" Dim dr As DataRow = DataTables("应付").SQLFind("立帐编码='" & str & "'", "立帐日期 Desc") Dim dw As DataRow = DataTables("应收").SQLFind("立帐编码='" & str & "'", "立帐日期 Desc") If dr IsNot Nothing Then Dim wz As Integer = Tables("应付").FindRow(dr) If wz >= 0 Then Tables("应付").Position = wz End If Forms("付立帐").Open() ElseIf dw IsNot Nothing Then Dim wr As Integer = Tables("应收").FindRow(dw) If wr >= 0 Then Tables("应收").Position = wr End If Forms("收立帐").Open() End If Else MessageBox.Show("没找到立帐编码") End If
|