T
Tom Glatt
I created an update query (posted below) that I thought was constructed
properly. However, it seems to only update according to the first criteria
and the last criteria. In other words, it either updates my "Demographic"
field with Silent or Next and ignores the remaining criteria. I am sure if
has something to do with the between criteria, but I am at a loss. I am not
much of a query designer. Any assistance would be appreciated.
Query:
UPDATE Results SET Results.Demographic = IIf(Results.[Custom Data] Between
"1/1/1926" And "12/31/1945", "Silent",IIf(Results.[Custom Data] Between
"1/1/1946" And "12/31/1964", "Boomer",IIf(Results.[Custom Data] Between
"1/31/1965" And "12/31/1984", "GenX",IIf(Results.[Custom Data] Between
"1/31/1985" And "12/31/2002", "GenX","Next"))))
properly. However, it seems to only update according to the first criteria
and the last criteria. In other words, it either updates my "Demographic"
field with Silent or Next and ignores the remaining criteria. I am sure if
has something to do with the between criteria, but I am at a loss. I am not
much of a query designer. Any assistance would be appreciated.
Query:
UPDATE Results SET Results.Demographic = IIf(Results.[Custom Data] Between
"1/1/1926" And "12/31/1945", "Silent",IIf(Results.[Custom Data] Between
"1/1/1946" And "12/31/1964", "Boomer",IIf(Results.[Custom Data] Between
"1/31/1965" And "12/31/1984", "GenX",IIf(Results.[Custom Data] Between
"1/31/1985" And "12/31/2002", "GenX","Next"))))