Hello,
Searching did not yield a prior forum posting so here is my dilema working with an Access query.
Filtering field: SURVCATEGORY (text field): the field could have a combination of letters or numbers (IA2, 2AI, I2, E1, ABCDE, ...)
Filter: Like "*I*" Or Like "*E*" Or Like "*1*" Or Like "*2*" And Not Like "*D*"
This filter is successful in extracting the data set desired.
I now wanted to identify the record with a calculated column that if the condition was met, the value of the exit date would display, otherwise "No" so I added LicYes: LicYes: IIf([survcateg] Like "*I*",[Exit_Date],IIf([survcateg] Like "*E*",[Exit_Date],"No"))
Comment: this results in a data type mismatch.
1. If I take Or Like "*1*" Or Like "*2*" out of my SURVCATEGORY filter LicYes works fine and there are no errors. Obviously it is not liking the numerals in this calculation.
2. I have tried using cstr() without success: LicYes: IIf(cstr([survcateg]) Like "*I*",[Exit_Date],IIf(cstr([survcateg]) Like "*E*",[Exit_Date],"No"))
3. I have tried using a calculated string of the SURVCATEGORY called STRCATEG using the CSTR([SURVCATEGORY]) formula without success in the LicYes field: IIf([STRCATEG] Like "*I ....... Still a data mismatch
I am missing something obvious here that for some reason I am missing. Any help appreciated