The following code works OK with the command buttons for "FIRST" and "LAST" and OK too while inside the last and first records.
When I hit "NEXT" while on the last record (ie 5 of 5)
I get a syntax error. no error number it just says "Syntax Error in string.
Note: txtInvestorNumber and txtInvestmentID are Integers. The rest are vachar.
I would appreciate any help.
frmHoldings.adoSharesSold.RecordSource = "SELECT SUM (NUmber_Of_Shares_Sold) FROM Holdings WHERE Investor_Number = " & frmStartPage.txtInvestorNumber & " AND Investment_ID = " & frmHoldings.txtInvestmentID & " AND Account_Number = '" & frmHoldings.txtAccountNumber & "' AND Symbol = '" & frmHoldings.txtSymbol & "'"
frmHoldings.adoSharesSold.Refresh
Thanks,
Dwight
When I hit "NEXT" while on the last record (ie 5 of 5)
I get a syntax error. no error number it just says "Syntax Error in string.
Note: txtInvestorNumber and txtInvestmentID are Integers. The rest are vachar.
I would appreciate any help.
frmHoldings.adoSharesSold.RecordSource = "SELECT SUM (NUmber_Of_Shares_Sold) FROM Holdings WHERE Investor_Number = " & frmStartPage.txtInvestorNumber & " AND Investment_ID = " & frmHoldings.txtInvestmentID & " AND Account_Number = '" & frmHoldings.txtAccountNumber & "' AND Symbol = '" & frmHoldings.txtSymbol & "'"
frmHoldings.adoSharesSold.Refresh
Thanks,
Dwight