Displaying numbers

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

Guest

Lets see if I can word this correctly.
I am trying to do some breakdown of product full load qtys but want it
displayed like I did long division.

example:
1 pallet = 50 pcs.
101 pcs were shipped.
Answer 2.02 displayed as 2 full loads and 1 pc.
I don't want a decimal. I want it displayed like long divison.
How do I go about doing this? Can anyone help?
 
Use the Integer Divisor (backslash) to get the whole number, and Mod to get
the remainder:

=Str([Pieces] \ [PalletSize]) & " full load(s) and " & Str([Pieces] Mod
PalletSize]) & " piece(s)"
 
OK awsome. That is what I was looking for. But now I have run into another
problem.
This allowes me to break it down by each part.
Each order has multipal parts.
So Lets say:
Order #1
Part #1 3 loads 2 pcs
Part #2 1 load
Part #3 5 loads 8 pcs.

I want to total these up. so it would display:
9 Loads and 10 pcs.
I try to use the SUM fuction in the query but it comes up with a error saying
"Data type mismatch in criteria expression"
How would I go about adding up these totals?
I know this is probably very easy. I am just not thinking at the right level.
Thanks.

Allen Browne said:
Use the Integer Divisor (backslash) to get the whole number, and Mod to get
the remainder:

=Str([Pieces] \ [PalletSize]) & " full load(s) and " & Str([Pieces] Mod
PalletSize]) & " piece(s)"

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Sydious said:
Lets see if I can word this correctly.
I am trying to do some breakdown of product full load qtys but want it
displayed like I did long division.

example:
1 pallet = 50 pcs.
101 pcs were shipped.
Answer 2.02 displayed as 2 full loads and 1 pc.
I don't want a decimal. I want it displayed like long divison.
How do I go about doing this? Can anyone help?
 
If you want to sum them, you will need to break it into 2 fields in your
query.

In query design, type this into a fresh column in the Field row:
Loads: [Pieces] \ [PalletSize]
Then in the next row:
Pieces: [Pieces] Mod PalletSize]

Since these are now numeric fields, you should be able to sum them.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Sydious said:
OK awsome. That is what I was looking for. But now I have run into another
problem.
This allowes me to break it down by each part.
Each order has multipal parts.
So Lets say:
Order #1
Part #1 3 loads 2 pcs
Part #2 1 load
Part #3 5 loads 8 pcs.

I want to total these up. so it would display:
9 Loads and 10 pcs.
I try to use the SUM fuction in the query but it comes up with a error
saying
"Data type mismatch in criteria expression"
How would I go about adding up these totals?
I know this is probably very easy. I am just not thinking at the right
level.
Thanks.

Allen Browne said:
Use the Integer Divisor (backslash) to get the whole number, and Mod to
get
the remainder:

=Str([Pieces] \ [PalletSize]) & " full load(s) and " & Str([Pieces]
Mod
PalletSize]) & " piece(s)"

Sydious said:
Lets see if I can word this correctly.
I am trying to do some breakdown of product full load qtys but want it
displayed like I did long division.

example:
1 pallet = 50 pcs.
101 pcs were shipped.
Answer 2.02 displayed as 2 full loads and 1 pc.
I don't want a decimal. I want it displayed like long divison.
How do I go about doing this? Can anyone help?
 
Thanks for your help. I can pick up all the hair I pulled out trying to get
this done. THANKS again!
Have a great new years!
 
Back
Top