Hi All,
Could you please take a look at this sql statement and tell me where I have gone wrong? I am getting the error "characters found after end of SQL statement". I am working on getting a listbox to sort by column headings when a label is clicked.
Any help appreciated.
Could you please take a look at this sql statement and tell me where I have gone wrong? I am getting the error "characters found after end of SQL statement". I am working on getting a listbox to sort by column headings when a label is clicked.
Code:
strSql = "SELECT tblMachinery.ID, tblMachinery.MCodedID, tblDept.DeptName, tblMachinery.MName, " & _
"tblMachinery.MLocation, tblMachinery.MDateCreated, tblMachinery.MDateAudit, " & _
"tblMachinery.MRandomNumber, tblMachinery.MUploaded, IIf([MUploaded]=-1,""Y"",""N"") " & _
"AS yesnoU, tblMachinery.MTags, IIf([MTags]=-1,""Y"",""N"") AS yesnoT " & _
"FROM tblDept INNER JOIN tblMachinery ON tblDept.DeptID = tblMachinery.MDept " & _
"ORDER BY tblMachinery.MCodedID;"
Any help appreciated.