dynamictiger
Registered User.
- Local time
- Today, 13:57
- Joined
- Feb 3, 2002
- Messages
- 270
I have the following SQL statement in my code.
strSQL = "SELECT tblPoolOrderTreatment.ReportType, tblPoolOrderTreatment.Parameter, " & _
"tblPoolTestParameter.TestAcronym, tblPoolOrderTreatment.TestOrder, " & _
"tblPoolOrderTreatment.TreatmentOrder, tblPoolChemicalMessage.Introduction, " & _
"tblPoolChemicalMessage.Conclusion, Nz([Introduction]) " & ' strA ' & " Nz([Conclusion]) AS Message" & _
"FROM tblPoolTestParameter INNER JOIN (tblPoolChemicalMessage " & _
"INNER JOIN tblPoolOrderTreatment " & _
"ON tblPoolChemicalMessage.MessageID = tblPoolOrderTreatment.Message) " & _
"ON (tblPoolTestParameter.TestParameterID = tblPoolChemicalMessage.TestParameter) " & _
"AND (tblPoolTestParameter.TestParameterID = tblPoolOrderTreatment.Parameter) " & _
"ORDER BY tblPoolOrderTreatment.ReportType, tblPoolOrderTreatment.TreatmentOrder;"
The line
is giving me no end of problems. I have tried every conceivable mixture. I cna get it to work as a query but not as an SQL statement no matter what I try.
This particular iteration is changing to a lovely red colour, which whilst pretty is not what we want.
strSQL = "SELECT tblPoolOrderTreatment.ReportType, tblPoolOrderTreatment.Parameter, " & _
"tblPoolTestParameter.TestAcronym, tblPoolOrderTreatment.TestOrder, " & _
"tblPoolOrderTreatment.TreatmentOrder, tblPoolChemicalMessage.Introduction, " & _
"tblPoolChemicalMessage.Conclusion, Nz([Introduction]) " & ' strA ' & " Nz([Conclusion]) AS Message" & _
"FROM tblPoolTestParameter INNER JOIN (tblPoolChemicalMessage " & _
"INNER JOIN tblPoolOrderTreatment " & _
"ON tblPoolChemicalMessage.MessageID = tblPoolOrderTreatment.Message) " & _
"ON (tblPoolTestParameter.TestParameterID = tblPoolChemicalMessage.TestParameter) " & _
"AND (tblPoolTestParameter.TestParameterID = tblPoolOrderTreatment.Parameter) " & _
"ORDER BY tblPoolOrderTreatment.ReportType, tblPoolOrderTreatment.TreatmentOrder;"
The line
Nz([Introduction]) " & ' strA ' & " Nz([Conclusion]) AS Message" & _
is giving me no end of problems. I have tried every conceivable mixture. I cna get it to work as a query but not as an SQL statement no matter what I try.
This particular iteration is changing to a lovely red colour, which whilst pretty is not what we want.