Blank fill when field has no data

G

Guest

I have a field which I want to fill with blank spaces if no data is entered.
For example, I want the field to fill 8 spaces, if the user types 3 charaters
(alpha or numberic) I want it to put 5 blank spaces, if the user types 2
charaters I want it to put 6 spaces (I know how to do this) however my
problem is if the user types nothing, I want it to put 8 spaces. I need the
spaces to because the data will eventually get output on a report, which gets
exported as a text document, and the spacing is important.
 
G

Graham Mandeno

I suggest it will be much easier to store the strings in their trimmed form
and then pad them as necessary when the time comes to export them.

The following expression in your export query will do the padding:
Left([FieldName] & Space(8), 8)

Note that it will also truncate any strings longer than 8 characters, but I
assume that is what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top