A query text field called "customer name" has a variable length. I want to convert "customer name" to a fixed length field including exactly 35 characters by adding spaces at the end of the field.
Try something like this in your query, using your field and table names.
The Word and Spaces fields are just to show that it's working as advertised.
When you're satisfied with it, just eliminate those two calculated fields.
Code:
SELECT Trim([YourField]) & Space(35-Len(Trim([YourField]))) AS Expr1, Len(Trim([YourField])) AS Word, 35-[Word] AS Spaces
FROM YourTable
WHERE ((IsNull([YourField])=False))
ORDER BY Trim([YourField]) & Space(35-Len(Trim([YourField])));
I noticed that you used [POLICY INSURED NAME] as well as Trim([POLICY INSURED NAME]) in your query. In the event that [POLICY INSURED NAME] is terminated by a space, then an extra character would be added. Try modifying the query by adding the Trim command (marked in RED)