Update Query using concatenate

User avatar
Michael Abrams
4StarLounger
Posts: 573
Joined: 10 Feb 2010, 17:32

Update Query using concatenate

Post by Michael Abrams »

Good Morning,

I have been doing this for 20 years and should be able to get this.

But I can't. :sad:

I am writing an update query to update field "New Group" ​in table 1

BS-WOOO1864-M0024515
Where WOOO1864 is field GROUPID in table 1
and M0024515 is field PLANID in table 1

I have tried variations of
“BS-“&[GroupID]&”-”&[ PlanID]

Please assist and thank you so much for all of the help over the years.

Michael Abrams

User avatar
HansV
Administrator
Posts: 78415
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Update Query using concatenate

Post by HansV »

Access, VBA and SQL require straight quotes ", not curly quotes “ ”.
And there should always be a space before and after the concatenation operator &.

"BS-" & [GroupID] & "-" & [ PlanID]
Best wishes,
Hans

User avatar
Michael Abrams
4StarLounger
Posts: 573
Joined: 10 Feb 2010, 17:32

Re: Update Query using concatenate

Post by Michael Abrams »

Thanks HansV - works great!