G
Guest
I have fields containing the following examples:
Cpart junk
126-698-95P-X87- 126-689-95P-
126-698-95P- 126-689-
I have the following expression in my query:
BestStatusDate: IIf([Status]="6",DLookUp("[LTDate]","QueryA","[CPart] = '" &
[junk] & "' AND [Status] = '1'"),[LTDate])
The expression in the field "junk" is: junk: Left([CPart],Len([CPart])-4)
This works great as long as CPart has 3 characters then a dash, but a lot of
my CPart fields have a different number of characters between the dashes like
569-98-99S-6I66-
I'm looking for a way to rewrite the expression in the "junk" field that
will extract the last dash and all the characters before the previous dash OR
maybe there's a way to rewrite my BestStatusDate expression without using the
"junk" field and using only CPart.
Thank you. I appreciate any help you can give -
Cpart junk
126-698-95P-X87- 126-689-95P-
126-698-95P- 126-689-
I have the following expression in my query:
BestStatusDate: IIf([Status]="6",DLookUp("[LTDate]","QueryA","[CPart] = '" &
[junk] & "' AND [Status] = '1'"),[LTDate])
The expression in the field "junk" is: junk: Left([CPart],Len([CPart])-4)
This works great as long as CPart has 3 characters then a dash, but a lot of
my CPart fields have a different number of characters between the dashes like
569-98-99S-6I66-
I'm looking for a way to rewrite the expression in the "junk" field that
will extract the last dash and all the characters before the previous dash OR
maybe there's a way to rewrite my BestStatusDate expression without using the
"junk" field and using only CPart.
Thank you. I appreciate any help you can give -