Displaying dashes from table

A

Andy G

I have a field, 'FundAcct' (let's say with a value of 420-11-7847) that is
formated in a table as Text, 7, Input mask of 000\-00\-00;;_ It is stored
with the dashes in the table. I have a query which is for use in a report.
The query pulls that field and the field is displayed with the dashes when I
run the query alone. I then display that 'FundAcct' in a report with a text
control. The dashes disappear, looks like 420117847. I know Access has
report formatting issues but this should be an easy fix.

Thanks.
 
F

fredg

I have a field, 'FundAcct' (let's say with a value of 420-11-7847) that is
formated in a table as Text, 7, Input mask of 000\-00\-00;;_ It is stored
with the dashes in the table. I have a query which is for use in a report.
The query pulls that field and the field is displayed with the dashes when I
run the query alone. I then display that 'FundAcct' in a report with a text
control. The dashes disappear, looks like 420117847. I know Access has
report formatting issues but this should be an easy fix.

Thanks.

You are mistaken. Your dashes are NOT being saved with the data (if
the above sample is how your Mask is actually written).
Also, I fail to see how you can input 4 characters in the final
position when your mask shows two (-00) in that position.

To enter a Social Security # value and save the value with the dashes,
change the mask to:
000\-00\-0000;0;_

Notice the 0 between the semi-colons.
That tells Access to save the dashes.

See Access help on Input Masks.

You'll need to run an update query to convert the present data without
dashes to include the dashes.

Update YourTable Set YourTable.SSN = Format([SSN],"@@@-@@-@@@@");

The use the new Mask for new data entry.
 

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