Hello - I'm trying to trim trailing spaces in a field where it contains ID:
for example the above has a space at the end and after the load, the space still exists!
Any help would be greatly appreciated - thank you!
PurgeChar(ID, chr(32) )
Tried and didn't work - I found out a method in another thread to look for the chr of the space and it is actually a non-breaking space chr160 - so a purgechar worked instead.
Glad you found the solution. Usually trim removes any leading and trailing spaces. I suspect something was there other than space and causing the problem. But I didn't thought about the non breaking space at the time.
What about this:
PurgeChar(ID, ' '&Chr(32)) as ID
This was really close! I used =Ord(Right([ID],1)) and found out the chr was 160 instead of 32 and used
PurgeChar(ID,Chr(160)) as ID
Thanks again Sunny for the speedy response!
Awesome, that was a smart way to determine what the CHR was. I am going to keep that in mind for the future.
If you got what you wanted, please close this thread by marking your answer as correct and any other helpful responses.
Thanks for the reminder! Just marked as correct.
Retrieving data ...