View Full Version : Dropping the zero


samonwalkabout
04-11-2003, 07:08 AM
I have a primary key field. 5 digits ie 023/03 i am using an input mask of 00/000 but if the frist digit is a zero (as it will be until we generate over 99 records) then its not visable. The wizard wont run coz its a number field and the help file doesnt seem to contain the answers.

Thanks in advance :)

neileg
04-11-2003, 07:34 AM
You can format this field to display the leading zero where you use it in a form or a report. But since it's a number, a leading zero has no meaning.

I would not use a field like this as a key. I tend to use an autonumber, and if I want to have another field with a fancy format, I add this on. Saves a lot of trouble.

samonwalkabout
04-14-2003, 12:43 AM
I have it set up like this for many complex reasons.

You can format this field to display the leading zero where you use it in a form or a report.

Great Stuff.... Hows it done?

Thanks

neileg
04-14-2003, 01:01 AM
The easiest way is to format in the table. Select your field in design view and in the format property type 000/00. Access will change this the 000\/00, and then show the field the way you want.

Any report or form will inheirit this format.

samonwalkabout
04-14-2003, 01:41 AM
Thank you thats done the job a treat.