not needed on the very first line, so might be a typo
but you can still include one anyway - you do need at least one. the query interpreter will ignore additional spaces, and linefeeds.
You also don't need the end semi colon, only required t the end of the parameter line if parameters are declared.
I tend to use the linebreak characters, but still assign to a sqlstr before running/executing
Code:
dim sqlStr as string
sqlStr="Update MarksDistribution" & _
" SET MarksDistribution.urduT = Forms!marksDistribution!urdu," & _
" marksDistribution.englishT = Forms!marksDistribution!english" & _
" WHERE class = Forms!marksDistribution!CList;"
docmd.runsql sqlStr
however there is a limit of 10? linebreaks but easily handled by combining with the variable method already suggested
An alternative view for slightly easier checking
Code:
sqlStr="Update MarksDistribution SET" & _
" MarksDistribution.urduT = Forms!marksDistribution!urdu," & _
" marksDistribution.englishT = Forms!marksDistribution!english" & _
" WHERE class = Forms!marksDistribution!CList;"
And you can drop quite a bit more if this code is in your marksDistribution form - this assumes that urduT and englishT are both text and clist is numeric
Code:
sqlStr="Update MarksDistribution SET" & _
" MarksDistribution.urduT = '" & urdu & "'," & _
" marksDistribution.englishT = '" & english "'" & _
" WHERE class = " & CList
and finally you can drop the table name if the field name is unique
Code:
sqlStr="Update MarksDistribution SET" & _
" urduT = '" & urdu & "'," & _
" englishT = '" & english "'" & _
" WHERE class = " & CList
saves a lot of typing