Weird subtotals

K

k3geyer

Hi,

Anybody know how to subtoal only some rowsonto main form?I have invoices and
Imsupposd to keep trackof how much meals or.klometres this guy used up sofar.
For 1 invoicethere is many lines in subeform but only someof them are
mealsand kilomtres, lots of other stuff too.The lines havea code for if it
was klm or foodor what thingit was.1total for meals 1 totalfor klmetrs.
thankyou.
 
D

Damian S

Hi k3geyer,

Something like this will work for you:

=sum(iif([ITEMTYPE]="Meal", [ITEMVALUE], 0))

where ITEMTYPE and ITEMVALUE are the fields holding the appropriate data.

Damian.
 
K

k3geyer

Wow-thanks that works great if I use the field& stop tryng use the combo!!But
Im little confuesd if you have time.

What ihave
every subfrom line have text box for totaalmeals or0 if not meal. everyline
have text box for total klm or 0if not klm.Every textbox show total for all
invoice not only this line.so if 4 lines with 250km 100klm 2000 klm 5klm
every line show 2355 klmtres.
ok is good keep that total total.

What I want to but cant make
every line have 1 more text box calclate TOTAL for olny this line
like [email protected]=150.00TOTAL thisline only.if nextline have [email protected]
text bos show =240.00TOTAL that linonly and 1st line still keep 150.00.
Cn you help me?thank you Damian.

--
k3geyer


Damian S said:
Hi k3geyer,

Something like this will work for you:

=sum(iif([ITEMTYPE]="Meal", [ITEMVALUE], 0))

where ITEMTYPE and ITEMVALUE are the fields holding the appropriate data.

Damian.

k3geyer said:
Hi,

Anybody know how to subtoal only some rowsonto main form?I have invoices and
Imsupposd to keep trackof how much meals or.klometres this guy used up sofar.
For 1 invoicethere is many lines in subeform but only someof them are
mealsand kilomtres, lots of other stuff too.The lines havea code for if it
was klm or foodor what thingit was.1total for meals 1 totalfor klmetrs.
thankyou.
 
K

k3geyer

thankyou Damian itworks super my splling was toast.
thanksfor the help man!!
--
k3geyer


k3geyer said:
Wow-thanks that works great if I use the field& stop tryng use the combo!!But
Im little confuesd if you have time.

What ihave
every subfrom line have text box for totaalmeals or0 if not meal. everyline
have text box for total klm or 0if not klm.Every textbox show total for all
invoice not only this line.so if 4 lines with 250km 100klm 2000 klm 5klm
every line show 2355 klmtres.
ok is good keep that total total.

What I want to but cant make
every line have 1 more text box calclate TOTAL for olny this line
like [email protected]=150.00TOTAL thisline only.if nextline have [email protected]
text bos show =240.00TOTAL that linonly and 1st line still keep 150.00.
Cn you help me?thank you Damian.

--
k3geyer


Damian S said:
Hi k3geyer,

Something like this will work for you:

=sum(iif([ITEMTYPE]="Meal", [ITEMVALUE], 0))

where ITEMTYPE and ITEMVALUE are the fields holding the appropriate data.

Damian.

k3geyer said:
Hi,

Anybody know how to subtoal only some rowsonto main form?I have invoices and
Imsupposd to keep trackof how much meals or.klometres this guy used up sofar.
For 1 invoicethere is many lines in subeform but only someof them are
mealsand kilomtres, lots of other stuff too.The lines havea code for if it
was klm or foodor what thingit was.1total for meals 1 totalfor klmetrs.
thankyou.
 
D

Damian S

Hi again,

How do you know that there were 2 tyres? If you have some sort of quantity
box, you could simply have a control that says:

=[QTY]*[ITEMCOST]

Is this what you are getting at?

Damian.

k3geyer said:
Wow-thanks that works great if I use the field& stop tryng use the combo!!But
Im little confuesd if you have time.

What ihave
every subfrom line have text box for totaalmeals or0 if not meal. everyline
have text box for total klm or 0if not klm.Every textbox show total for all
invoice not only this line.so if 4 lines with 250km 100klm 2000 klm 5klm
every line show 2355 klmtres.
ok is good keep that total total.

What I want to but cant make
every line have 1 more text box calclate TOTAL for olny this line
like [email protected]=150.00TOTAL thisline only.if nextline have [email protected]
text bos show =240.00TOTAL that linonly and 1st line still keep 150.00.
Cn you help me?thank you Damian.

--
k3geyer


Damian S said:
Hi k3geyer,

Something like this will work for you:

=sum(iif([ITEMTYPE]="Meal", [ITEMVALUE], 0))

where ITEMTYPE and ITEMVALUE are the fields holding the appropriate data.

Damian.

k3geyer said:
Hi,

Anybody know how to subtoal only some rowsonto main form?I have invoices and
Imsupposd to keep trackof how much meals or.klometres this guy used up sofar.
For 1 invoicethere is many lines in subeform but only someof them are
mealsand kilomtres, lots of other stuff too.The lines havea code for if it
was klm or foodor what thingit was.1total for meals 1 totalfor klmetrs.
thankyou.
 
K

k3geyer

Hi DamianS

That works reallygreat.igot confused on SUMIF andSUM.Didn know Access
hadSUMIF.You rock!!thank you.
--
k3geyer


Damian S said:
Hi again,

How do you know that there were 2 tyres? If you have some sort of quantity
box, you could simply have a control that says:

=[QTY]*[ITEMCOST]

Is this what you are getting at?

Damian.

k3geyer said:
Wow-thanks that works great if I use the field& stop tryng use the combo!!But
Im little confuesd if you have time.

What ihave
every subfrom line have text box for totaalmeals or0 if not meal. everyline
have text box for total klm or 0if not klm.Every textbox show total for all
invoice not only this line.so if 4 lines with 250km 100klm 2000 klm 5klm
every line show 2355 klmtres.
ok is good keep that total total.

What I want to but cant make
every line have 1 more text box calclate TOTAL for olny this line
like [email protected]=150.00TOTAL thisline only.if nextline have [email protected]
text bos show =240.00TOTAL that linonly and 1st line still keep 150.00.
Cn you help me?thank you Damian.

--
k3geyer


Damian S said:
Hi k3geyer,

Something like this will work for you:

=sum(iif([ITEMTYPE]="Meal", [ITEMVALUE], 0))

where ITEMTYPE and ITEMVALUE are the fields holding the appropriate data.

Damian.

:

Hi,

Anybody know how to subtoal only some rowsonto main form?I have invoices and
Imsupposd to keep trackof how much meals or.klometres this guy used up sofar.
For 1 invoicethere is many lines in subeform but only someof them are
mealsand kilomtres, lots of other stuff too.The lines havea code for if it
was klm or foodor what thingit was.1total for meals 1 totalfor klmetrs.
thankyou.
 
Top