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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"From Vba statement" 1

Status
Not open for further replies.

lars7

Technical User
Aug 16, 2005
817
GB
Hi There,
I've got a problem with this "From Vba statement". The query works in SQL and with only one LEFT JOIN in Vba but when I add the second or third I get a "Syntax error in From clause"

"FROM [trust staff] LEFT JOIN tblahp ON [trust staff].SHORT_GRADE = tblahp.ShortGradegroups, LEFT JOIN [Service Descriptions] ON [trust staff].DIV = [Service Descriptions].D_DIV, LEFT JOIN [Discipline Descriptions] ON [trust staff].DISCIPLINE = [Discipline Descriptions].D_DISCIPLINE " & _

Can anyone tell me why. I will post the full statement if required.
 
Code:
"FROM [COLOR=red yellow](([/color][trust staff] LEFT JOIN tblahp ON [trust staff].SHORT_GRADE = tblahp.ShortGradegroups[COLOR=red yellow])[/color] LEFT JOIN [Service Descriptions] ON [trust staff].DIV = [Service Descriptions].D_DIV[COLOR=red yellow])[/color] LEFT JOIN [Discipline Descriptions] ON [trust staff].DISCIPLINE = [Discipline Descriptions].D_DISCIPLINE " & _

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Hi Golom,
I copied this over from a SQL query and removed the brackets as I though they where only used in SQL, DOH!!!.

Thanks for the help again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top