-----Original Message-----
Gayle said:
I think there is a problem with the label's wizard. When
I delete the part of the string that puts in the employee
number, and then bring it in as a separate text box, the
leading zeros show up. The problem is that I need it as a
string because it doesn't fit otherwise. Any
suggestions? I had problems with the label wizard not
formatting zip code + 4 correctly. It wouldn't put in the
dash. I was able to bet a fix for that from this site. I
was given new formatting to include in the control
source.
Well, if it's already a string, then a numeric format won't
have any effect. Since your description above makes it
sound like you have more than just the field name in the
text box's control source, you'll have to post it here so I
can see what's happening.
Lacking those details, I'll guess that you are concatenating
something to the employee number. Maybe the text box or the
query has an expression sort of like:
="Employee Number: " & EmployeeNum
If that's the kind of thing you're doing, then you have to
use the Format function to make the number look the way you
want:
="Employee Number: " & Format([EmployeeNum], "000")
--
Marsh
MVP [MS Access]
-----Original Message-----
Gayle wrote:
I need my labels report to show leading zeros. All of
my
other reports show me the leading zeros of employee
numbers (007), but in my labels report, it only shows
7.
How can I fix this?
My data type in my table is "number" as I need to be
able
to run a report that sorts employees in order by their
numbers. Using data type "text" didn't allow me to do
that. I've formatted the numbers as "000" The Employee
numbers is also used as my key source.
Normally, setting the report's text box's Format property
to
000 would provide the leading zeros, double check it to be
sure. If the text box's Format property is correct, then
there must be something else doing something to convert
the
number to a string. Try looking at the report's record
source query to see if there's anything that might do an
implicit conversion.
If all else fails, try setting the text box's control
source
to the expression =CLng([employeenumber] (and make sure
the
text box's name is not the same as the field name).
.