I am trying to delete the current record in a recordset. Can I do this without specifying "WHERE" in my statement?
Do Until Cusip <> RS!Cusip
If RS!SegInd = True Then
BBHFx = RS!FoxBal
BBHBl = RS!BlushBal
BBHCC = RS!OptCBal
BBHRR = RS!OptRBal
FName = RS!FundName
FDesc = RS!FundDesc
AcctName = RS!AcctName
AcctNum = RS!Acct6
NewFBal = BBHFx * -1
NewBBal = BBHBl * -1
NewCBal = BBHCC * -1
NewRBal = BBHRR * -1
DoCmd.RunSQL "INSERT INTO TblInput; etc {is LONG}"
DoCmd.RunSQL ("DELETE * From TblNewRec2 ?WHERE? "
'**TblNewRec2 is RS recordset**
End If
Loop
I just want to delete this current record. I have tried using the "WHERE" clause to specify, but when I compare the table's field to my variables (cusip, acctnum, etc) it prompts me to enter a value for those variables instead of using the ones I initialized already.
Do Until Cusip <> RS!Cusip
If RS!SegInd = True Then
BBHFx = RS!FoxBal
BBHBl = RS!BlushBal
BBHCC = RS!OptCBal
BBHRR = RS!OptRBal
FName = RS!FundName
FDesc = RS!FundDesc
AcctName = RS!AcctName
AcctNum = RS!Acct6
NewFBal = BBHFx * -1
NewBBal = BBHBl * -1
NewCBal = BBHCC * -1
NewRBal = BBHRR * -1
DoCmd.RunSQL "INSERT INTO TblInput; etc {is LONG}"
DoCmd.RunSQL ("DELETE * From TblNewRec2 ?WHERE? "
'**TblNewRec2 is RS recordset**
End If
Loop
I just want to delete this current record. I have tried using the "WHERE" clause to specify, but when I compare the table's field to my variables (cusip, acctnum, etc) it prompts me to enter a value for those variables instead of using the ones I initialized already.