Remove Leading Spaces from a Field in a Microsoft Access Update Query
Question details
Remove leading spaces from existing values in a Province field using an Access update query.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user wants to clean Province values in an Access table.
- Observed behavior
- The Province values should no longer begin with spaces, while trailing spaces remain unchanged.
Open the database in Microsoft Access and identify the table containing the Province field. Make sure you have permission to update its records.
Use LTrim in an Access update query
Use this method to remove leading spaces from existing Province values in the table.
In Access, select Create > Query Design and add the table that contains the Province field.
On the Query Design tab, select Update to display the Update To row in the design grid.
Add Province to the grid, then enter LTrim([Province]) in its Update To cell.
Select Run on the Query Design tab and confirm the update when Access prompts you.

Work with exported Access data in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for a smooth transition. Use WPS Spreadsheets to work with data exported from Access; it does not run or update Access database queries.

Frequently Asked Questions
Where do I enter LTrim in the update query?
In Query Design, select Update, add the Province field, and enter LTrim([Province]) in the field's Update To cell.
Does LTrim also remove trailing spaces?
No. LTrim removes leading spaces only. To remove both leading and trailing spaces, use Trim([Province]) in the Update To cell instead.
Will the update query change the existing table values?
Yes. Selecting Run and confirming the prompt updates the matching records in the table. If you add no criteria, the query applies to all records.
Can WPS Office run this Access update query?
No. Run the update query in Microsoft Access. WPS Spreadsheets can work with data exported to a supported spreadsheet format, but it does not update the Access database query.




