How to Split Pipe-Delimited Access Data into Separate Records
Question details
The user needs to convert a single database field containing multiple parameter names and values separated by pipes into multiple individual records for better database structure.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Normalizing database records where multiple parameters are merged into a single string field, separated by pipe ('|') delimiters.
- Observed behavior
- Data is currently stored in a single, un-normalized text field, making future data queries, filtering, and analysis difficult.
Before running any VBA scripts or action queries, make sure to create a backup copy of your Access database and ensure your target tables are set up with the correct fields to receive the split data.
Use VBA to Split Data and Append to Target Table
This approach uses a VBA Recordset loop to read delimited strings, split them into arrays, and append them as individual rows in a new target table.
Using VBA is the most robust method for splitting complex strings in Access. By splitting the parameter name and value into separate fields during the transfer process, you create a properly normalized data structure that vastly improves query performance.
In Microsoft Access, press the ALT + F11 keys on your keyboard to open the Visual Basic for Applications (VBA) editor.
Insert a new module and declare your variables. Open your source table using dbOpenForwardOnly and your target table using dbOpenDynaset via the dbs.OpenRecordset method.
Use a 'Do While Not rstIn.EOF' loop to iterate through each row. Inside the loop, use the native 'Split(rstIn!Parameters, " | ")' function to separate the parameter string into a VBA array.
Loop through the newly created array. Split the parameter name and value using the equals sign as a delimiter, then use 'rstOut.AddNew' to populate the ParamName and ParamValue fields, followed by 'rstOut.Update' to save the record.

Create a Custom Split Function with a Numbers Table
Define a user-defined function in VBA and use it alongside a numbers (tally) table to query and return one parameter per record dynamically.
Analyze Your Exported Database Records with WPS Office
While Microsoft Access is required for running specific VBA database scripts, WPS Office is an excellent, free alternative for managing exported reports, spreadsheets, and document formatting. Once your data is normalized and exported as a CSV or Excel file, you can seamlessly open and analyze it using WPS Spreadsheet.
- 1. Download WPS Office: Download and install the free WPS Office suite on your device.
- 2. Export Access Data: Export your newly normalized Access tables or queries into a standard CSV or Excel file.
- 3. Open and Analyze: Launch WPS Spreadsheet, open your exported file, and use built-in tools like PivotTables to analyze your data.

Frequently Asked Questions
Why is it better to split delimited fields into separate records?
Splitting delimited fields into normalized records with distinct parameter name and value fields significantly improves database query performance, allows for proper field indexing, and makes sorting or filtering data much easier.
Can I use a native Text-to-Columns feature instead of VBA in Access?
Unlike Excel, Microsoft Access does not feature a native Text-to-Columns button to split strings into multiple rows. You must rely on VBA scripts or complex queries utilizing a numbers table and string manipulation functions.
What happens if my parameter string has inconsistent formatting?
If your delimited string is inconsistent, such as having missing spaces around the pipe delimiter, the VBA Split function may return unexpected array elements. It is recommended to use the Replace or Trim functions within your VBA code to sanitize the string before splitting.




