Advertisement
Advertisement
| 06.12.2008 at 06:26AM PDT, ID: 23479316 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: |
Dim dblocal As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stSQL As String
Set dblocal = CurrentProject.Connection
Set rst = New ADODB.Recordset
stSQL = ""
stSQL = "SELECT InvestmentID FROM tblInvestment WHERE InvestorID = " & cboInvestor.Value & " AND FundID = " & cboFund.Value
stSQL = stSQL & " AND ClassID = " & cboClass.Value & " AND SeriesID = " & cboSeries.Value
rst.Open stSQL, dblocal, adOpenDynamic, adLockOptimistic
If rst.BOF = False Or rst.EOF = False Then
If txtInvestmentID.Value > 0 Then
Else
txtInvestmentID.Value = rst.Fields("InvestmentID")
End If
rst.Close
stSQL = ""
stSQL = "UPDATE tblInvestment SET FundID = " & cboFund.Value & ", ClassID = " & cboClass.Value & ", SeriesID = " & cboSeries.Value
stSQL = stSQL & ", InitialLiquidityID = " & cboInitLiq.Value & ", MaintLiquidityID = " & cboMaintLiq.Value & ", MaintLiquidityOffset = "
stSQL = stSQL & txtLiqOffset & ", LiquidityGate = " & txtLiqGate.Value & ", RedNoticeMths = " & txtNoticeMnths.Value
stSQL = stSQL & ", InvestmentDate = '" & txtTransDate.Value & "', OFACInd = " & chkOFAC.Value & ", FATFInd = " & chkFATF.Value
stSQL = stSQL & ", ModDate = '" & txtModDate.Value & "', ModUser = '" & txtModUser.Value & "' WHERE InvestorID = " & cboInvestor.Value
dblocal.Execute stSQL '<---------- Catastrophic failure here
' Code continues with else condition, etc.
|