Sum in text box on form

F

Fred's

Hi folks, hope that someone can help me with my problem:

I've build a table called: "Cedule_Tbl" and I've build a form with it,
called "Form1". in my table, I have the following field names and
datatype. (I didn't put any primary key to my table)

Field names: Data Type:
ID AutoNumber
Heure Date/Time
TransporteurOuRemorque Text
Seal Text
Porte Text
Footwear Number
ALDO Number
Feet-First Number
Transit Number
Globo Number
Handbags Number
ALDO/ Number
NonALDO Number
Accesories Number
ALDO1 Number
NonALDO1 Number

On my form, I need to have the following sum.
PS. The data in the datatype is numbers that represent quantity of
cartons.

I bear you, what are the formulas, I'm a worst than a beginner in this
matter;

A Total sum of cartons for the merchandise type (Footwear), the sum
must come from the sum of units (ALDO +Feet-First +Transit +Globo )

A Total sum of cartons for the merchandise type (Handbag), the sum
must come from the sum of units (ALDO/ +NonALDO)

A Total sum of cartons for the merchandise type (Accesories), the sum
must come from the sum of units (ALDO1/ +NonALDO1)

A Grand Total sum of cartons for the each merchandise type (Footwear,
handbag and accesories).

And the Grand Grand total of cartons to received.

Thanking you all in advance for your help and support.
Fred's
 
L

Lance

Make the control source equal something like:

=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")
 
D

Douglas J. Steele

Just in case either of the fields are Null, you'd be better off using

=DSum("Nz([Field1], 0) + Nz([Field2],0)","myTable","[ID] = 'MYID'")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Lance said:
Make the control source equal something like:

=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")

Fred's said:
Hi folks, hope that someone can help me with my problem:

I've build a table called: "Cedule_Tbl" and I've build a form with it,
called "Form1". in my table, I have the following field names and
datatype. (I didn't put any primary key to my table)

Field names: Data Type:
ID AutoNumber
Heure Date/Time
TransporteurOuRemorque Text
Seal Text
Porte Text
Footwear Number
ALDO Number
Feet-First Number
Transit Number
Globo Number
Handbags Number
ALDO/ Number
NonALDO Number
Accesories Number
ALDO1 Number
NonALDO1 Number

On my form, I need to have the following sum.
PS. The data in the datatype is numbers that represent quantity of
cartons.

I bear you, what are the formulas, I'm a worst than a beginner in this
matter;

A Total sum of cartons for the merchandise type (Footwear), the sum
must come from the sum of units (ALDO +Feet-First +Transit +Globo )

A Total sum of cartons for the merchandise type (Handbag), the sum
must come from the sum of units (ALDO/ +NonALDO)

A Total sum of cartons for the merchandise type (Accesories), the sum
must come from the sum of units (ALDO1/ +NonALDO1)

A Grand Total sum of cartons for the each merchandise type (Footwear,
handbag and accesories).

And the Grand Grand total of cartons to received.

Thanking you all in advance for your help and support.
Fred's
 
F

Fred's

Just in case either of the fields are Null, you'd be better off using

=DSum("Nz([Field1], 0) + Nz([Field2],0)","myTable","[ID] = 'MYID'")

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)




Make the control source equal something like:
=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")
"Fred's" wrote:

- Show quoted text -

Hi Doug,



I've put the following formulas; =DSum("Nz([ALDO], 0) + Nz([Feet-
First],0) + Nz([Transit],0) + Nz([Globo],0)","Cedule_Tbl","[ID] =
''MYID")

But it don't seems to be working right, I 'm getting this error: "
#Error" What should I do?

Thank you for your help!
Fred's
 
D

Douglas J. Steele

Is MYID a variable? It needs to go outside of the quotes:

=DSum("Nz([ALDO], 0) + Nz([Feet-First],0) + Nz([Transit],0) +
Nz([Globo],0)","Cedule_Tbl","[ID] =" & MYID)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Fred's said:
I've put the following formulas; =DSum("Nz([ALDO], 0) + Nz([Feet-
First],0) + Nz([Transit],0) + Nz([Globo],0)","Cedule_Tbl","[ID] =
''MYID")

But it don't seems to be working right, I 'm getting this error: "
#Error" What should I do?

Thank you for your help!
Fred's> On Nov 29, 9:23 am, "Douglas J. Steele"
Just in case either of the fields are Null, you'd be better off using

=DSum("Nz([Field1], 0) + Nz([Field2],0)","myTable","[ID] = 'MYID'")

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)




Make the control source equal something like:
=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")
"Fred's" wrote:
Hi folks, hope that someone can help me with my problem:
I've build a table called: "Cedule_Tbl" and I've build a form with it,
called "Form1". in my table, I have the following field names and
datatype. (I didn't put any primary key to my table)
Field names: Data Type:
ID AutoNumber
Heure Date/Time
TransporteurOuRemorque Text
Seal Text
Porte Text
Footwear Number
ALDO Number
Feet-First Number
Transit Number
Globo Number
Handbags Number
ALDO/ Number
NonALDO Number
Accesories Number
ALDO1 Number
NonALDO1 Number
On my form, I need to have the following sum.
PS. The data in the datatype is numbers that represent quantity of
cartons.
I bear you, what are the formulas, I'm a worst than a beginner in this
matter;
A Total sum of cartons for the merchandise type (Footwear), the sum
must come from the sum of units (ALDO +Feet-First +Transit +Globo )
A Total sum of cartons for the merchandise type (Handbag), the sum
must come from the sum of units (ALDO/ +NonALDO)
A Total sum of cartons for the merchandise type (Accesories), the sum
must come from the sum of units (ALDO1/ +NonALDO1)
A Grand Total sum of cartons for the each merchandise type (Footwear,
handbag and accesories).
And the Grand Grand total of cartons to received.
 
F

Fred's

Is MYID a variable? It needs to go outside of the quotes:

=DSum("Nz([ALDO], 0) + Nz([Feet-First],0) + Nz([Transit],0) +
Nz([Globo],0)","Cedule_Tbl","[ID] =" & MYID)

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)






I've put the following formulas; =DSum("Nz([ALDO], 0) + Nz([Feet-
First],0) + Nz([Transit],0) + Nz([Globo],0)","Cedule_Tbl","[ID] =
''MYID")
But it don't seems to be working right, I 'm getting this error: "
#Error" What should I do?
Thank you for your help!
Fred's> On Nov 29, 9:23 am, "Douglas J. Steele"
Just in case either of the fields are Null, you'd be better off using
=DSum("Nz([Field1], 0) + Nz([Field2],0)","myTable","[ID] = 'MYID'")
--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)

Make the control source equal something like:
=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")
:
Hi folks, hope that someone can help me with my problem:
I've build a table called: "Cedule_Tbl" and I've build a form with it,
called "Form1". in my table, I have the following field names and
datatype. (I didn't put any primary key to my table)
Field names: Data Type:
ID AutoNumber
Heure Date/Time
TransporteurOuRemorque Text
Seal Text
Porte Text
Footwear Number
ALDO Number
Feet-First Number
Transit Number
Globo Number
Handbags Number
ALDO/ Number
NonALDO Number
Accesories Number
ALDO1 Number
NonALDO1 Number
On my form, I need to have the following sum.
PS. The data in the datatype is numbers that represent quantity of
cartons.
I bear you, what are the formulas, I'm a worst than a beginner in this
matter;
A Total sum of cartons for the merchandise type (Footwear), the sum
must come from the sum of units (ALDO +Feet-First +Transit +Globo )
A Total sum of cartons for the merchandise type (Handbag), the sum
must come from the sum of units (ALDO/ +NonALDO)
A Total sum of cartons for the merchandise type (Accesories), the sum
must come from the sum of units (ALDO1/ +NonALDO1)
A Grand Total sum of cartons for the each merchandise type (Footwear,
handbag and accesories).
And the Grand Grand total of cartons to received.- Hide quoted text -

- Show quoted text -

Hi doug,
What do you mean by "MYID" is a variable? And what should I replace
"MYID" by something?

Thanking you in advance
Fred's
 
L

Lance

In the simple example I provided MYID isn't a variable, it's the value you
want to filter by. Using your examples you would replace MYID with
"footwear" or "handbag" or whatever, and it would need to be within quotes.
Obviously, you would need to adjust the field names to match those in your
table.

Alternately, you could improve the form design by using a combo box to
select a criteria and have a bit of VB code to adjust the control source
depending on what value you select.


Fred's said:
Is MYID a variable? It needs to go outside of the quotes:

=DSum("Nz([ALDO], 0) + Nz([Feet-First],0) + Nz([Transit],0) +
Nz([Globo],0)","Cedule_Tbl","[ID] =" & MYID)

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)






I've put the following formulas; =DSum("Nz([ALDO], 0) + Nz([Feet-
First],0) + Nz([Transit],0) + Nz([Globo],0)","Cedule_Tbl","[ID] =
''MYID")
But it don't seems to be working right, I 'm getting this error: "
#Error" What should I do?
Thank you for your help!
Fred's> On Nov 29, 9:23 am, "Douglas J. Steele"
Just in case either of the fields are Null, you'd be better off using
=DSum("Nz([Field1], 0) + Nz([Field2],0)","myTable","[ID] = 'MYID'")
Make the control source equal something like:
=DSum("[Field1] + [Field2]","myTable","[ID] = 'MYID'")
"Fred's" wrote:
Hi folks, hope that someone can help me with my problem:
I've build a table called: "Cedule_Tbl" and I've build a form with it,
called "Form1". in my table, I have the following field names and
datatype. (I didn't put any primary key to my table)
Field names: Data Type:
ID AutoNumber
Heure Date/Time
TransporteurOuRemorque Text
Seal Text
Porte Text
Footwear Number
ALDO Number
Feet-First Number
Transit Number
Globo Number
Handbags Number
ALDO/ Number
NonALDO Number
Accesories Number
ALDO1 Number
NonALDO1 Number
On my form, I need to have the following sum.
PS. The data in the datatype is numbers that represent quantity of
cartons.
I bear you, what are the formulas, I'm a worst than a beginner in this
matter;
A Total sum of cartons for the merchandise type (Footwear), the sum
must come from the sum of units (ALDO +Feet-First +Transit +Globo )
A Total sum of cartons for the merchandise type (Handbag), the sum
must come from the sum of units (ALDO/ +NonALDO)
A Total sum of cartons for the merchandise type (Accesories), the sum
must come from the sum of units (ALDO1/ +NonALDO1)
A Grand Total sum of cartons for the each merchandise type (Footwear,
handbag and accesories).
And the Grand Grand total of cartons to received.- Hide quoted text -

- Show quoted text -

Hi doug,
What do you mean by "MYID" is a variable? And what should I replace
"MYID" by something?

Thanking you in advance
Fred's
 

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