Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Error - Missing Operator 1

Status
Not open for further replies.

BvCF

MIS
Nov 11, 2006
92
0
0
Having a syntax error , missing operator in query expression, for the following code.

When debugging, the lines after "CurrentDb.Execute "Update tblVar..." is highlighted.

Any insight as to what I am missing would be greatly appreciated.


Function UpdateAccess()
CurrentDb.Execute "DELETE * FROM tblUpdateTemp"
CurrentDb.Execute "INSERT INTO tblUpdateTemp (VIDCurrent, AcctNo, Type, Date, " & _
"State, DateBilled, TotChgCurrent, ExpReimbCurrent, TotInsPymtsCurrent, TotPymts, BalanceCurrent," & _
"RemitCharges,MasAllowCurrent, CoNo, VarianceCurrent) Select VIDCurrent , AcctNo, Type," & _
"Date, State, DateBilled, TotChgCurrent, ExpReimbCurrent, TotInsPymtsCurrent," & _
"TotPymts, BalanceCurrent, RemitCharges, MasAllowCurrent, CoNo, VarianceCurrent FROM qrySQLPassthru_Update;"
CurrentDb.Execute "UPDATE tblVar INNER JOIN tblUpdateTemp ON tblVar.AcctNo = tblUpdateTemp.AcctNo" & _
"SET tblVar.VIDCurrent = tblUpdateTemp.VIDCurrent, tblVar.Type = tblUpdateTemp.Type, " & _
"tblVar.Date = tblUpdateTemp.Date, " & _
"tblVar.State = tblUpdateTemp.State, tblVar.DateBilled = tblUpdateTemp.DateBilled," & _
"tblVar.TotChgCurrent = tblUpdateTemp.TotChgCurrent, tblVar.ExpReimbCurrent = tblUpdateTemp.ExpReimbCurrent, " & _
"tblVar.TotInsPymtsCurrent = tblUpdateTemp.TotInsPymtsCurrent, tblVar.TotPymts = tblUpdateTemp.TotPymts," & _
"tblVar.BalanceCurrent = tblUpdateTemp.BalanceCurrent, tblVar.RemitCharges = tblUpdateTemp.RemitCharges," & _
"tblVar.MasAllowCurrent = tblUpdateTemp.MasAllowCurrent, tblVar.CoNo = tblUpdateTemp.CoNo, " & _
"tblVar.VarianceCurrent = tblUpdateTemp.VarianceCurrent, tblVar.DateEncUpdated = Now() "
End Function
 
How are ya BvCF . . .

On 1st scan a missing space:
Code:
[blue]CurrentDb.Execute "UPDATE tblVar INNER JOIN tblUpdateTemp ON tblVar.AcctNo = tblUpdateTemp.AcctN[COLOR=red yellow]o"[/color] & _"SET tblVar.VIDCurrent =[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top