Link to home
Start Free TrialLog in
Avatar of Matt Harrison
Matt Harrison

asked on

Multiple criteria on one field

I have primary created reports in access but I am attempting to switch over to crystal. I am having an issue figuring out how to implement multiple conditions on one field.

Example

{ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"]

but then I also need to pull anything that is in ML.ML.LOCATION that is between A-14-01-A to A-14-01-F and between A-12-01-A to A-12-06-F

I cant seem to figure out how to get that all to work together? I tried
{ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"] and
{ML.ML_LOCATION} in "A-14-01-A" to "A-14-01-F" and
{ML.ML_LOCATION} in "A-12-01-A" to "A-12-06-F"

but that did not seem to work properly. Any suggestions?
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

1- you will need to replace AND with OR
2- Does CR supports BETWEEN?

({ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"]) OR
({ML.ML_LOCATION} between "A-14-01-A" and "A-14-01-F") OR
({ML.ML_LOCATION} between "A-12-01-A" and "A-12-06-F")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Matt Harrison
Matt Harrison

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial