Use the Trim function in Access
elbazdaniel
Posted messages
14
Status
Member
-
yg_be Posted messages 23437 Registration date Status Contributor Last intervention -
yg_be Posted messages 23437 Registration date Status Contributor Last intervention -
Hello,
I’m struggling with the Trim function or more precisely, I don't know where to use it.
I want to remove the trailing spaces from a column in an Access database because it causes bugs and crashes.
Help... I’m trying to use the Microsoft explanations but I don't understand anything...
Can you help me, please? It’s true that this is a step-by-step guidance issue.
Thank you
Daniel
Configuration: Windows / Chrome 63.0.3239.84
--
I’m struggling with the Trim function or more precisely, I don't know where to use it.
I want to remove the trailing spaces from a column in an Access database because it causes bugs and crashes.
Help... I’m trying to use the Microsoft explanations but I don't understand anything...
Can you help me, please? It’s true that this is a step-by-step guidance issue.
Thank you
Daniel
Configuration: Windows / Chrome 63.0.3239.84
--
2 answers
-
yg_be Posted messages 23437 Registration date Status Contributor Last intervention Ambassadeur 1 588
I think it will be enough to do:UPDATE totrim SET txt = rtrim(txt);
-
- First of all, you need to modify the text I proposed. You should replace "totrim" with the name of your table, and "txt" (twice) with the name of your field.
Then, under the Create tab, in the Queries group, click on Query Design. Note: if you are using Access 2007, under the Create tab, in the Other group, click on Query Design.
Close the Show Table dialog box.
Click on the SQL button. Replace the displayed text ("SELECT...") with the modified suggested text.
Click on the "run" button.
-
-
yg_be Posted messages 23437 Registration date Status Contributor Last intervention Ambassadeur 1 588
Hello, do you want to modify the content of the database, or do you want to ignore the spaces when you use the information from your database?
Can you share the name of your table, the name and type of your text field?