Labels

  • Thread starter Thread starter Gayle
  • Start date Start date
G

Gayle

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.
 
Gayle said:
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).
 
Are you concatenating the number to other fields? If so, you need to use:
=Format(EmpNum,"000") & FirstName & " " & LastName
 
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.
-----Original Message-----
Gayle said:
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).
 
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 said:
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).
 
This is what's in my text box control source: =Trim
([strRanks] & " " & [strEmployeeNumber])
That is what the wizard does automatically. The employee
number is formatted "000" in the original table. Do I
need to format it in my query also? If I do, I'm not sure
how to do that. I've tried your formatting in the text
box control source that you mentioned, but must have done
something wrong, because I kept getting errors.
-----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).

.
 
=Trim([strRanks] & " " & Format([strEmployeeNumber],"000"))


--
Duane Hookom
MS Access MVP


Gayle said:
This is what's in my text box control source: =Trim
([strRanks] & " " & [strEmployeeNumber])
That is what the wizard does automatically. The employee
number is formatted "000" in the original table. Do I
need to format it in my query also? If I do, I'm not sure
how to do that. I've tried your formatting in the text
box control source that you mentioned, but must have done
something wrong, because I kept getting errors.
-----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).

.
 
Thank you, that worked.
-----Original Message-----
=Trim([strRanks] & " " & Format ([strEmployeeNumber],"000"))


--
Duane Hookom
MS Access MVP


This is what's in my text box control source: =Trim
([strRanks] & " " & [strEmployeeNumber])
That is what the wizard does automatically. The employee
number is formatted "000" in the original table. Do I
need to format it in my query also? If I do, I'm not sure
how to do that. I've tried your formatting in the text
box control source that you mentioned, but must have done
something wrong, because I kept getting errors.
-----Original Message-----
Gayle wrote:

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).

--
Marsh
MVP [MS Access]
.


.


.
 
Sigh!

Duane definitely has the magic touch. ;-)
--
Marsh
MVP [MS Access]


Thank you, that worked.
Duane Hookom wrote
=Trim([strRanks] & " " & Format([strEmployeeNumber],"000"))


This is what's in my text box control source:
=Trim([strRanks] & " " & [strEmployeeNumber])

use the Format function to make the number look the way
you want:
="Employee Number: " & Format([EmployeeNum], "000")


-----Original Message-----
Gayle wrote:

I need my labels report to show leading zeros.
 
This is basically the same answer I provided on 11/13. Maybe I have made
this mistake before...

--
Duane Hookom
MS Access MVP


Marshall Barton said:
Sigh!

Duane definitely has the magic touch. ;-)
--
Marsh
MVP [MS Access]


Thank you, that worked.
Duane Hookom wrote
=Trim([strRanks] & " " & Format([strEmployeeNumber],"000"))


This is what's in my text box control source:
=Trim([strRanks] & " " & [strEmployeeNumber])

use the Format function to make the number look the way
you want:
="Employee Number: " & Format([EmployeeNum], "000")


-----Original Message-----
Gayle wrote:

I need my labels report to show leading zeros.
 
Duane said:
This is basically the same answer I provided on 11/13. Maybe I have made
this mistake before...

You on the 13th, me on the 14th and you again on the 17th.

It must be one of those third time's the charm things ;-)
 
Back
Top