In VBA I am Generating a Dynamic Query based on criteria entered on a form. When using the AND the query adds the 2nd field to the 2nd column and it works OK.
Example: If [Combo508] <> " " Then
where = where & "(([PeriodFrom1] >= """ & [Combo508] & """))"
If [Combo510] <> " " Then
where = where & " and (([PeriodTo1] <= """ & [Combo557] & """))"
This does not work using 2nd statement as OR:
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>