What do you mean by doesn't seem to work?
You could use a combination of the TRim (LRim) function and the LEN function to check out whether trimming actually isn't working for you.
Maybe I'm going about this the wrong way. I neglected to mention that I am new to VBA. The Trim function works when I use it in a SQL statement but it doesn't from code could you guide me.