Number Formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need the number in my report to have a certain format for importing into a program using COBAL. For example, the number in the table/query is 25, I need the report to adjust the format to read 00000025. Any ideas?
 
I need the number in my report to have a certain format for
importing into a program using COBAL. For example, the number in
the table/query is 25, I need the report to adjust the format to
read 00000025. Any ideas?

In the report:

=Format([NumberField],"00000000")
 
When I enter that string in the format box in the properties menu for that field, Access automatically changes the entry to look like this: "=for"m"at([Avg of Ga"s"],000000)". What that about?

fredg said:
I need the number in my report to have a certain format for
importing into a program using COBAL. For example, the number in
the table/query is 25, I need the report to adjust the format to
read 00000025. Any ideas?

In the report:

=Format([NumberField],"00000000")
 
Also, tried putting this in the control source field, no dice. Give an "error #" when the report is run. Where in the report do I use the string you gave?

fredg said:
I need the number in my report to have a certain format for
importing into a program using COBAL. For example, the number in
the table/query is 25, I need the report to adjust the format to
read 00000025. Any ideas?

In the report:

=Format([NumberField],"00000000")
 
When I enter that string in the format box in the properties menu for that field, Access automatically changes the entry to look like this: "=for"m"at([Avg of Ga"s"],000000)". What that about?

fredg said:
I need the number in my report to have a certain format for
importing into a program using COBAL. For example, the number in
the table/query is 25, I need the report to adjust the format to
read 00000025. Any ideas?

In the report:

=Format([NumberField],"00000000")

It does not go in the Format property of the control, it goes into an
UNBOUND Control's Control Source.

You can also use the expression to include text with the number.
In an Unbound control's Control Source:
="This is some good deal " & Format([NumberField],"00000000")
But NOT in the Format property of the control. In it's Control Source.
 
Also, tried putting this in the control source field, no dice. Give an "error #" when the report is run. Where in the report do I use the string you gave?

fredg said:
I need the number in my report to have a certain format for
importing into a program using COBAL. For example, the number in
the table/query is 25, I need the report to adjust the format to
read 00000025. Any ideas?

In the report:

=Format([NumberField],"00000000")

If the name of the control is the same as the [NumberField] you will
get an error. Change the Control Name to something else.
 
Back
Top