View Full Version : Required Data Format


Kenln
05-18-2007, 05:53 AM
I'm using an input mask of:
AAA\-AAAaaa
This allows three Characters, followed by a "-" followed by three more characters, followed by optional three more characters.

My problem is that the "-" is not actually part of the data. It is only there for viewing. I would like (need) it part of the actual data becuase I use this information else where (VBA, exports to excel, etc...).

How can I define a field that required the hyphen as part of the real data.

I'm posting this in both VBA and Tables because I don't know if the answer is via a mask or code. Either way is fine

Thank you

Kenln
05-18-2007, 05:53 AM
I'm using an input mask of:
AAA\-AAAaaa
This allows three Characters, followed by a "-" followed by three more characters, followed by optional three more characters.

My problem is that the "-" is not actually part of the data. It is only there for viewing. I would like (need) it part of the actual data becuase I use this information else where (VBA, exports to excel, etc...).

How can I define a field that required the hyphen as part of the real data.

I'm posting this in both VBA and Tables because I don't know if the answer is via a mask or code. Either way is fine

Thank you

ColinEssex
05-18-2007, 05:57 AM
There's no need to post the same question twice.:rolleyes:

Col

Dennisk
05-18-2007, 06:04 AM
If you format the data to agree with the input mask then your problem sould be solved.

for instance

I always use an input mask of 00/00/00 foe dates (except DOB)
and I specify a format of dd/mm/yy

Kenln
05-18-2007, 06:20 AM
How would I specify a format for the data???

I tried: @@@-@@@&&&
Which doesn't seem to help. Remember I don't just want to display a hyphen which I can do with an input mask. I want the hyphen to actually be there as part of the data.

KKilfoil
05-18-2007, 12:53 PM
Don't store the hyphen.

Create a query that contains all of your table's values, with a calculated field to add in the hyphen where appropriate.

Then use the new field everywhere that you need the hypenated field to appear.

Kenln
05-21-2007, 04:19 AM
This is actually what I am doing.

My problem is that the "-" is not actually part of the data. It is only there for viewing. I would like (need) it as part of the actual data becuase I use this information else where (VBA, exports to excel, etc...).