aldipalo Posted January 27, 2009 Posted January 27, 2009 I thought this would be simple, but, it's driving me crazy! Here's what I'm trying to do. I have a text field fk_UnitID that contains the following type data. I-02F or II-04G or I-12A, etc. The I or II denotes the Building and the right side the apartment. I set up a calculation to get the Building from the UnitID: Case( Left(FK_UnitID;2) = "-";Left(FK_UnitID;1); Left(FK_UnitID;2) ) My problem is I get the II if the unit is II-02F but get, I- if the unit is I-12A. I just want I. What am I doing wrong?: TIA Al
comment Posted January 27, 2009 Posted January 27, 2009 If the format is consistent, i.e. there's always a letter just before the hyphen and a numeric character immediately after, you can use: LeftWords ( UnitID ; 1 )
aldipalo Posted January 27, 2009 Author Posted January 27, 2009 Excellent. I tried Leftwords, but I was doing doing some fool thing wrong because it just wasn't working. Thanks for the quick reply.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now