I am fairly new to VBA. I have a query set up, but I am not sure what I have done wrong. What I need is to pull all the records from the builder table where the SC is equal to any one of these ("14","20","28","30","40","45","51","59","64","66","67")
AND any of these "yr_b" through "yr_s" needs to be greater than 2 so b or c or d or e. I know there has to be an easier way to do this, but I am just not that good in VBA quite yet.
Any help would be greatly appreciated.
Right now this is what my query looks like:
Thanks in advance.
Heather
AND any of these "yr_b" through "yr_s" needs to be greater than 2 so b or c or d or e. I know there has to be an easier way to do this, but I am just not that good in VBA quite yet.
Any help would be greatly appreciated.
Right now this is what my query looks like:
Code:
SELECT BUILDER.*
FROM BUILDER
WHERE (((BUILDER.YR_B)>2)) OR (((BUILDER.YR_C)>2)) OR (((BUILDER.YR_D)>2)) OR (((BUILDER.YR_E)>2)) OR (((BUILDER.YR_F)>2)) OR (((BUILDER.YR_G)>2)) OR (((BUILDER.YR_H)>2)) OR (((BUILDER.YR_I)>2)) OR (((BUILDER.YR_J)>2)) OR (((BUILDER.YR_K)>2)) OR (((BUILDER.YR_L)>2)) OR (((BUILDER.YR_M)>2)) OR (((BUILDER.YR_n)>2)) OR (((BUILDER.YR_o)>2)) OR (((BUILDER.YR_p)>2)) OR (((BUILDER.YR_q)>2)) OR (((BUILDER.YR_r)>2)) OR (((BUILDER.YR_s)>2)) AND (((Left([BUILDER.SC],2)) In ("14","20","28","30","40","45","51","59","64","66","67")));
Thanks in advance.
Heather