Leading zeros

  • Thread starter DKnight via AccessMonster.com
  • Start date
D

DKnight via AccessMonster.com

Hi,
I have a parameter query and I would like for the user to not have to enter
the leading zeros. How can I do this?
 
J

Jeff Boyce

?Leading zeros?

Are you saying your data is being stored with leading zeros? Or does it
just display that way?

What is the data type of the underlying field? Is it text or number?

More info, please...


Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

DKnight via AccessMonster.com

The data is stored with the leading zeroes. It is a number field.

Thanks,
 
J

Jeff Boyce

Sorry, but "numbers" don't have leading zeros. 0000000001 and 1 are the
same number. Access stores it as 1.

I'm guessing your table definition (or your form) formats that to display
leading zeros.

Text fields can have leading zeros because text is text, and a "0" character
and a "z" character are still just string characters.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

DKnight via AccessMonster.com

I am using a table created by the software company that we use. All I have
is the table layout. I can only 'read' the data. The field has 9(10)
described as the size. I thought that the 9 showed this to be a number field
10 digits long. If I pull any data using that field, it always shows with the
leading zeros. How do I know what the description for the field is?

Jeff said:
Sorry, but "numbers" don't have leading zeros. 0000000001 and 1 are the
same number. Access stores it as 1.

I'm guessing your table definition (or your form) formats that to display
leading zeros.

Text fields can have leading zeros because text is text, and a "0" character
and a "z" character are still just string characters.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
The data is stored with the leading zeroes. It is a number field.
[quoted text clipped - 18 lines]
 
J

John Spencer

It would help if you had shown us the query you are using.

You might try the following as the criteria - where Enter Number is the
parameter you are using.

= Right("000000000" & [Enter Number],10)

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
D

DKnight via AccessMonster.com

That worked!
Thanks very much

John said:
It would help if you had shown us the query you are using.

You might try the following as the criteria - where Enter Number is the
parameter you are using.

= Right("000000000" & [Enter Number],10)

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
Hi,
I have a parameter query and I would like for the user to not have to enter
the leading zeros. How can I do this?
 

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