Using Access 2007. I have a field called "Status" in my DB that gives the status of an opportunity in a sales cycle. Status has values like:
Qualified
Qualifed/Swing
Commit
Commit/Swing
Trans
Trans/Commit
I want to write a simple query field to extract all text to the left of the "/" in the field. The challenge I have is that I get a #ERROR when the slash doesn't exist in the record. Here is my code:
Expr: Right(Trim([Status]),Len(Trim([Status]))-InStr(1, _
[Status],"/"))
How do I write the expression so that when the "/" isn't there, I just get the record back and not the #ERROR message.? Works great btw when the "/" is in the record.
Thanks.
Steve
Qualified
Qualifed/Swing
Commit
Commit/Swing
Trans
Trans/Commit
I want to write a simple query field to extract all text to the left of the "/" in the field. The challenge I have is that I get a #ERROR when the slash doesn't exist in the record. Here is my code:
Expr: Right(Trim([Status]),Len(Trim([Status]))-InStr(1, _
[Status],"/"))
How do I write the expression so that when the "/" isn't there, I just get the record back and not the #ERROR message.? Works great btw when the "/" is in the record.
Thanks.
Steve