Others

How to Preserve Spaces in Scanned Barcode Values in Microsoft Access

Kushani NimanthikaKushani Nimanthika Oct 26, 2026 868 views

Question details

The user needs to understand why spaces are stripped from scanned barcode inputs in Microsoft Access and how to ensure the spaces are retained in the database records.

How to Preserve Spaces in Scanned Barcode Values in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Scanning barcodes (such as those generated by a Zebra printer) into a Microsoft Access database table or form.
Observed behavior
Spaces present in the physical barcode disappear or are not recorded when the scanned value is stored in the database field.
Before you start

Verify that your hardware is correctly transmitting spaces by scanning the barcode directly into a plain text editor like Notepad before modifying your database.

Solution 1Recommended

Verify and Reconfigure Barcode Scanner Hardware

Hardware settings often dictate whether special characters, including spaces, are transmitted to the computer.

Microsoft Access stores barcode data exactly as it is sent by the scanner interface. If spaces are missing, the scanner itself may be configured to strip them to speed up data entry or conform to a specific keyboard emulation mode.

1
Test hardware output

Open a plain text editor like Notepad on your computer and scan the barcode. If the spaces are missing here as well, the issue is with the scanner, not Microsoft Access.

2
Consult the scanner manual

Locate the user manual for your specific barcode scanner model to find the configuration barcodes related to character transmission.

3
Enable space character transmission

Scan the appropriate configuration barcodes provided in the manual to ensure the scanner includes space characters and does not trim them during keyboard emulation.

Free Microsoft Office alternative

Manage Barcode Data Easily with WPS Office

If you need a simpler way to track and log barcode data without dealing with complex database configurations, WPS Spreadsheet provides a lightweight, free, and highly compatible alternative. You can easily log barcode scans with spaces intact.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and create a new blank spreadsheet.
  2. 2. Select the target cell: Click on the cell where you want the scanned barcode data to appear.
  3. 3. Scan the barcode: Use your connected barcode scanner. WPS Spreadsheet will instantly record the exact string, including all spaces.
Seamlessly logs barcode scanner inputs with spaces and special characters intact.Highly compatible with Microsoft Excel (.xlsx) formats for easy data sharing.Free, lightweight, and features a familiar user-friendly interface.Built-in data validation tools to help manage and organize inventory lists smoothly.
microsoft office alternative - wps office

Frequently Asked Questions

Why do barcodes generated by my Zebra printer lack spaces when scanned?

The issue often lies in the barcode symbology used during generation. Some formats (like standard Code 39) require special settings to encode spaces, while others (like Code 128) support spaces natively. Check your label generation software settings.

Does Microsoft Access automatically remove spaces from typed or scanned inputs?

By default, Microsoft Access does not remove spaces between words in a Short Text field. However, trailing spaces may be ignored, or specific Input Masks and VBA macros added by the database creator might automatically trim spaces.

How can I test if my barcode scanner is sending space characters?

Plug your scanner into your computer, open a plain text application like Notepad, and scan the barcode. If the spaces appear correctly in Notepad, your scanner is configured properly, and the issue is likely within your database software.