S
Shytown_Turk
When I try to run this query I am getting a syntax error Too Few Parameters,
expected 20. The unique ID used in the WHERE clause is a string and I am
having problems with the proper syntax.
-------------------------
"UPDATE tblSecurity SET tblSecurity.SecurityNm = [tblHistory].[SecurityNm],
" & _
"tblSecurity.AssetClassID = [tblHistory].[AssetClassID],
tblSecurity.ExpDate = [tblHistory].[ExpDate], tblSecurity.CreditID =
[tblHistory].[CreditID], " & _
"tblSecurity.Risk = [tblHistory].[Risk], tblSecurity.Taxable =
[tblHistory].[Taxable], tblSecurity.SecurityType =
[tblHistory].[SecurityType], " & _
"tblSecurity.SchwabType = [tblHistory].[SchwabType],
tblSecurity.ExpYr = [tblHistory].[ExpYr], tblSecurity.ExpMt =
[tblHistory].[ExpMt], tblSecurity.SectorTypeID = [tblHistory].[SectorTypeID],
" & _
"tblSecurity.IndustryTypeID = [tblHistory].[IndustryTypeID],
tblSecurity.MStarRate = [tblHistory].[MStarRate], tblSecurity.FairValue =
[tblHistory].[FairValue], " & _
"tblSecurity.[P/E] = [tblHistory].[P/E], tblSecurity.[P/B] =
[tblHistory].[P/B], tblSecurity.[P/CF] = [tblHistory].[P/CF],
tblSecurity.Moat = [tblHistory].[Moat], " & _
"tblSecurity.RatingDt = [tblHistory].[RatingDt],
tblSecurity.MStarRisk = [tblHistory].[MStarRisk], tblSecurity.LastUpdDt =
Date() " & _
"WHERE (((tblSecurity.CUSIP)=""CUSIP""))"
expected 20. The unique ID used in the WHERE clause is a string and I am
having problems with the proper syntax.
-------------------------
"UPDATE tblSecurity SET tblSecurity.SecurityNm = [tblHistory].[SecurityNm],
" & _
"tblSecurity.AssetClassID = [tblHistory].[AssetClassID],
tblSecurity.ExpDate = [tblHistory].[ExpDate], tblSecurity.CreditID =
[tblHistory].[CreditID], " & _
"tblSecurity.Risk = [tblHistory].[Risk], tblSecurity.Taxable =
[tblHistory].[Taxable], tblSecurity.SecurityType =
[tblHistory].[SecurityType], " & _
"tblSecurity.SchwabType = [tblHistory].[SchwabType],
tblSecurity.ExpYr = [tblHistory].[ExpYr], tblSecurity.ExpMt =
[tblHistory].[ExpMt], tblSecurity.SectorTypeID = [tblHistory].[SectorTypeID],
" & _
"tblSecurity.IndustryTypeID = [tblHistory].[IndustryTypeID],
tblSecurity.MStarRate = [tblHistory].[MStarRate], tblSecurity.FairValue =
[tblHistory].[FairValue], " & _
"tblSecurity.[P/E] = [tblHistory].[P/E], tblSecurity.[P/B] =
[tblHistory].[P/B], tblSecurity.[P/CF] = [tblHistory].[P/CF],
tblSecurity.Moat = [tblHistory].[Moat], " & _
"tblSecurity.RatingDt = [tblHistory].[RatingDt],
tblSecurity.MStarRisk = [tblHistory].[MStarRisk], tblSecurity.LastUpdDt =
Date() " & _
"WHERE (((tblSecurity.CUSIP)=""CUSIP""))"