Question Locked

MS Access update query: how to concatenate 3 fields with criteria

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to design an update query in MS Access that will concatenate up to 3 fields, 2 with criteria. This is for a catalog where the same product might appear on 1, 2, or 3 pages. The query would put the result in another field called CAT_Pages. Since I don't know Access that well, I've accomplished this by running 3 separate update queries and know that there must be a better, more elegant way. Can someone enlighten me?

Query 1
CAT_Pages = [CAT_Pg1]

Query 2
CAT_Pages = [CAT_Pg1] & "," [CAT_Pg2]
Criteria is [CAT_Pg2] > "1"

Query 3
CAT_Pages = [CAT_Pg1] & "," [CAT_Pg2] & "," [CAT_Pg3]
Criteria is [CAT_Pg3] > "1")

The field CAT_Pages is only used for reporting and printing and needs no further manipulation.

3 replies

by kayze834

hi im tryna finish my assignment and stuck on running q querie using the crimes data...

I have to find the crimes "illicit drugs" AND "Weapons or explosives"

The tricky thing is that that word "or" in weapons or explosives is affecting the results because access is thinking its an actual code but its not.

hope you can help, thanks.

This discussion is closed to new replies.