Others

Remove Leading Spaces from a Field in a Microsoft Access Update Query

Rana GarciaRana Garcia Nov 25, 2026 868 views

Question details

Remove leading spaces from existing values in a Province field using an Access update query.

Remove Leading Spaces from a Field in a Microsoft 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.
Before you start

Open the database in Microsoft Access and identify the table containing the Province field. Make sure you have permission to update its records.

Solution 1Recommended

Use LTrim in an Access update query

Use this method to remove leading spaces from existing Province values in the table.

1
Create a query

In Access, select Create > Query Design and add the table that contains the Province field.

2
Change the query type

On the Query Design tab, select Update to display the Update To row in the design grid.

3
Add the expression

Add Province to the grid, then enter LTrim([Province]) in its Update To cell.

4
Run the update

Select Run on the Query Design tab and confirm the update when Access prompts you.

Use LTrim in an Access update query
What LTrim removes: LTrim removes leading spaces only. It does not remove trailing spaces.
Free Microsoft Office alternative

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.

Review and edit exported Province data in a spreadsheetCompatible with Microsoft Excel XLSX and XLS filesFamiliar spreadsheet interface for an easier transitionFree and lightweight Office tools
QA img-9

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.