Error #3141

Jake94

Registered User.
Local time
Today, 04:11
Joined
Dec 28, 2006
Messages
15
I just inherited this report and I believe it is failing at this point. Does the punctuation look correct. Thanks for you help!!


strSQL = "SELECT ID, [BLAST Number], [Derivative Contact Information], [RE Follow Up Date], [RE Subject To's], [Real Estate Specialist Assigned Date], "

strSQL = strSQL & "[SBA Contact Information], [Environmental Aggregate Debt], [Environmental Risk Class], Left([[RE Request Form]].[Property Address],125) AS PropertyAddress, "

strSQL = strSQL & "[RETECHS Number], [RETECHS Process], [RETECHS Appraisal Ordered], [RETECHS Appraisal Received], [Title Company/Attorney Preference], [Title Ordered], [Title Received], "

strSQL = strSQL & "[RE Comments], [RE Follow Up Comments], [Title Work Needed], [Environmental Due Diligence Needed], [Real Estate Documents Needed], Covenants, [Location of Closing], "

strSQL = strSQL & "[Loan Fee], [Appraisal Fee], [RETECHS Review Fee], [Environmental Fee], [Title Search/Committment Fee], [Recording Fee], [Tax Service Fee], [Other Fee], [Mortgage Registry Tax (MN)], "

strSQL = strSQL & "FROM [RE Request Form] "

Error #3141 - The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
 
put

debug.print strSQL

in your code (this is something you should always do to check your SQL) and the output will be in the Immediate window (under the code window).

Inspect that.
BTW : Remove last comma

Edit: The output from the immediate window you can always paste into the SQL view of the Query Designer and use it as a built-in syntax checker. Once it works there, then you should know what to change.
 
Last edited:
One too many commas at the end of the list of fields

[Mortgage Registry Tax (MN)], FROM [RE Request Form]
 

Users who are viewing this thread

Back
Top Bottom