A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to perform mathematical operations in an Access form



 
 
Thread Tools Display Modes
  #11  
Old December 12th, 2006, 12:57 AM posted to microsoft.public.access.gettingstarted
chooriang
external usenet poster
 
Posts: 17
Default How to perform mathematical operations in an Access form

Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I mean re
is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function], [AC Fan
Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan Line].Line, [AC Fan
Line].[RoHS Status], [AC Fan Line].[OK Quantity], Sum([Striking])+([Striking
II])+([BB])+([Race Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock
NG])+([No Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable tie
app])+([Name Plate app])+([Label Barcode app])+([Screw hole size])+([Screw
app])+([Conn Pin app])+([Metal plate,Case,Cover app])+([Stamp app])+([Flap
app])+([Seal app])+([Paint app])+([Nut app])+([Sillicone app])+([Jet melt
app])+([Spray app])+([Lead assy Tube Cable tie length])+([Others]) AS Expr1,
([Expr1])/([OK Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan
Line].[Striking II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise],
[AC Fan Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan Line].[Slow
Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi Lo Current], [AC
Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come out], [AC Fan
Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC Fan Line].Intermittent,
[AC Fan Line].[Missing Parts], [AC Fan Line].[re missing], [AC Fan
Line].[Extra Parts], [AC Fan Line].[re extra], [AC Fan Line].[Wrong Parts],
[AC Fan Line].[re wrong], [AC Fan Line].[Vent Hous App], [AC Fan Line].[re
vent], [AC Fan Line].[Prop Imp App], [AC Fan Line].[re prop], [AC Fan
Line].[Lead assy Tube Cable tie App], [AC Fan Line].[re lsa], [AC Fan
Line].[name Plate App], [AC Fan Line].[re np], [AC Fan Line].[Label Barcode
App], [AC Fan Line].[re barcode], [AC Fan Line].[Screw Hole Size], [AC Fan
Line].[re size], [AC Fan Line].[Screw App], [AC Fan Line].[re screw], [AC
Fan Line].[Conn Pin App], [AC Fan Line].[re conn], [AC Fan Line].[Metal
Plate Case Cover App], [AC Fan Line].[re metal], [AC Fan Line].[Stamp App],
[AC Fan Line].[re stam], [AC Fan Line].[Flap App], [AC Fan Line].[re flap],
[AC Fan Line].[Seal App], [AC Fan Line].[re seal], [AC Fan Line].[Paint
App], [AC Fan Line].[re paint], [AC Fan Line].[Nut App], [AC Fan Line].[re
nut], [AC Fan Line].[sillicone App], [AC Fan Line].[re sillione], [AC Fan
Line].[Jet Melt App], [AC Fan Line].[re jetmelt], [AC Fan Line].[Spray App],
[AC Fan Line].[re sparay], [AC Fan Line].[Lead Asy Tube Cable tie Length],
[AC Fan Line].[re dimensi], [AC Fan Line].Others, [AC Fan Line].[re others],
[AC Fan Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove that and
see if it works. If you still have problems, and are willing, post the

SQL[i]
of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and it's
the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of your
form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left hand
of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds these
values?

Or do you have three columns and you want a total of the three in
each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that hold
the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a part
of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I am
having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am trying
to get the totals of these columns to appear in a separate
field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this problem
solved as soon as possible.

If you have a Continuous Form and you want to sum the values in
one field ("column"), put a textbox in the Form's Footer (make
the footer visible using the View menu option); set its Control
Source property to

=Sum([fieldname])

using the field name in the query upon which the form is based.

This sum should generally NOT be stored in any table field. Just
recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]





  #12  
Old December 12th, 2006, 02:34 PM posted to microsoft.public.access.gettingstarted
Joan Wild
external usenet poster
 
Posts: 642
Default How to perform mathematical operations in an Access form

Remove the 'Sum' at the start of Expr1


--
Joan Wild
Microsoft Access MVP

chooriang wrote:[i]
Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I
mean re is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function],
[AC Fan Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan
Line].Line, [AC Fan Line].[RoHS Status], [AC Fan Line].[OK Quantity],
Sum([Striking])+([Striking II])+([BB])+([Race
Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock NG])+([No
Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable tie
app])+([Name Plate app])+([Label Barcode app])+([Screw hole
size])+([Screw app])+([Conn Pin app])+([Metal plate,Case,Cover
app])+([Stamp app])+([Flap app])+([Seal app])+([Paint app])+([Nut
app])+([Sillicone app])+([Jet melt app])+([Spray app])+([Lead assy
Tube Cable tie length])+([Others]) AS Expr1, ([Expr1])/([OK
Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan Line].[Striking
II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise], [AC Fan
Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan
Line].[Slow Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi
Lo Current], [AC Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come
out], [AC Fan Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC Fan
Line].Intermittent, [AC Fan Line].[Missing Parts], [AC Fan Line].[re
missing], [AC Fan Line].[Extra Parts], [AC Fan Line].[re extra], [AC
Fan Line].[Wrong Parts], [AC Fan Line].[re wrong], [AC Fan
Line].[Vent Hous App], [AC Fan Line].[re vent], [AC Fan Line].[Prop
Imp App], [AC Fan Line].[re prop], [AC Fan Line].[Lead assy Tube
Cable tie App], [AC Fan Line].[re lsa], [AC Fan Line].[name Plate
App], [AC Fan Line].[re np], [AC Fan Line].[Label Barcode App], [AC
Fan Line].[re barcode], [AC Fan Line].[Screw Hole Size], [AC Fan
Line].[re size], [AC Fan Line].[Screw App], [AC Fan Line].[re screw],
[AC Fan Line].[Conn Pin App], [AC Fan Line].[re conn], [AC Fan
Line].[Metal Plate Case Cover App], [AC Fan Line].[re metal], [AC Fan
Line].[Stamp App], [AC Fan Line].[re stam], [AC Fan Line].[Flap App],
[AC Fan Line].[re flap], [AC Fan Line].[Seal App], [AC Fan Line].[re
seal], [AC Fan Line].[Paint App], [AC Fan Line].[re paint], [AC Fan
Line].[Nut App], [AC Fan Line].[re nut], [AC Fan Line].[sillicone
App], [AC Fan Line].[re sillione], [AC Fan Line].[Jet Melt App], [AC
Fan Line].[re jetmelt], [AC Fan Line].[Spray App], [AC Fan Line].[re
sparay], [AC Fan Line].[Lead Asy Tube Cable tie Length], [AC Fan
Line].[re dimensi], [AC Fan Line].Others, [AC Fan Line].[re others],
[AC Fan Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove
that and see if it works. If you still have problems, and are
willing, post the SQL of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and
it's the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of your
form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left
hand of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds these
values?

Or do you have three columns and you want a total of the three in
each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that
hold the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a
part of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I am
having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am trying
to get the totals of these columns to appear in a separate
field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this
problem solved as soon as possible.

If you have a Continuous Form and you want to sum the values in
one field ("column"), put a textbox in the Form's Footer (make
the footer visible using the View menu option); set its Control
Source property to

=Sum([fieldname])

using the field name in the query upon which the form is based.

This sum should generally NOT be stored in any table field.
Just recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]



  #13  
Old December 13th, 2006, 06:53 AM posted to microsoft.public.access.gettingstarted
chooriang
external usenet poster
 
Posts: 17
Default How to perform mathematical operations in an Access form

Joan,
it still can't be figured out.
I have removed the'sum' and rebuild the expression
No error message appear and there were no parameter value requesition.
But,It still can't be calculated.The field is blank,no result appear.

"Joan Wild" wrote in message
...[i]
Remove the 'Sum' at the start of Expr1


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I
mean re is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function],
[AC Fan Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan
Line].Line, [AC Fan Line].[RoHS Status], [AC Fan Line].[OK Quantity],
Sum([Striking])+([Striking II])+([BB])+([Race
Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock NG])+([No
Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable tie
app])+([Name Plate app])+([Label Barcode app])+([Screw hole
size])+([Screw app])+([Conn Pin app])+([Metal plate,Case,Cover
app])+([Stamp app])+([Flap app])+([Seal app])+([Paint app])+([Nut
app])+([Sillicone app])+([Jet melt app])+([Spray app])+([Lead assy
Tube Cable tie length])+([Others]) AS Expr1, ([Expr1])/([OK
Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan Line].[Striking
II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise], [AC Fan
Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan
Line].[Slow Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi
Lo Current], [AC Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come
out], [AC Fan Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC Fan
Line].Intermittent, [AC Fan Line].[Missing Parts], [AC Fan Line].[re
missing], [AC Fan Line].[Extra Parts], [AC Fan Line].[re extra], [AC
Fan Line].[Wrong Parts], [AC Fan Line].[re wrong], [AC Fan
Line].[Vent Hous App], [AC Fan Line].[re vent], [AC Fan Line].[Prop
Imp App], [AC Fan Line].[re prop], [AC Fan Line].[Lead assy Tube
Cable tie App], [AC Fan Line].[re lsa], [AC Fan Line].[name Plate
App], [AC Fan Line].[re np], [AC Fan Line].[Label Barcode App], [AC
Fan Line].[re barcode], [AC Fan Line].[Screw Hole Size], [AC Fan
Line].[re size], [AC Fan Line].[Screw App], [AC Fan Line].[re screw],
[AC Fan Line].[Conn Pin App], [AC Fan Line].[re conn], [AC Fan
Line].[Metal Plate Case Cover App], [AC Fan Line].[re metal], [AC Fan
Line].[Stamp App], [AC Fan Line].[re stam], [AC Fan Line].[Flap App],
[AC Fan Line].[re flap], [AC Fan Line].[Seal App], [AC Fan Line].[re
seal], [AC Fan Line].[Paint App], [AC Fan Line].[re paint], [AC Fan
Line].[Nut App], [AC Fan Line].[re nut], [AC Fan Line].[sillicone
App], [AC Fan Line].[re sillione], [AC Fan Line].[Jet Melt App], [AC
Fan Line].[re jetmelt], [AC Fan Line].[Spray App], [AC Fan Line].[re
sparay], [AC Fan Line].[Lead Asy Tube Cable tie Length], [AC Fan
Line].[re dimensi], [AC Fan Line].Others, [AC Fan Line].[re others],
[AC Fan Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove
that and see if it works. If you still have problems, and are
willing, post the SQL of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and
it's the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of your
form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left
hand of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds these
values?

Or do you have three columns and you want a total of the three in
each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that
hold the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a
part of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I am
having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am trying
to get the totals of these columns to appear in a separate
field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this
problem solved as soon as possible.

If you have a Continuous Form and you want to sum the values in
one field ("column"), put a textbox in the Form's Footer (make
the footer visible using the View menu option); set its Control
Source property to

=Sum([fieldname])

using the field name in the query upon which the form is based.

This sum should generally NOT be stored in any table field.
Just recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]





  #14  
Old December 13th, 2006, 02:10 PM posted to microsoft.public.access.gettingstarted
Joan Wild
external usenet poster
 
Posts: 642
Default How to perform mathematical operations in an Access form

Then likely, as Doug suggested, you have null values in some of those
fields. Null + 1 = Null

Use the formula he suggested:
Expr1:Nz([A],0)+Nz([b],0)+Nz([C],0)+Nz([D],0)+Nz([E],0)+Nz([F],0)+Nz([G],0)+Nz([H],0)+Nz([i],0)+Nz([J],0)


--
Joan Wild
Microsoft Access MVP

chooriang wrote:[i]
Joan,
it still can't be figured out.
I have removed the'sum' and rebuild the expression
No error message appear and there were no parameter value requesition.
But,It still can't be calculated.The field is blank,no result appear.

"Joan Wild" wrote in message
...
Remove the 'Sum' at the start of Expr1


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I
mean re is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function],
[AC Fan Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan
Line].Line, [AC Fan Line].[RoHS Status], [AC Fan Line].[OK
Quantity], Sum([Striking])+([Striking II])+([BB])+([Race
Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock NG])+([No
Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable
tie app])+([Name Plate app])+([Label Barcode app])+([Screw hole
size])+([Screw app])+([Conn Pin app])+([Metal plate,Case,Cover
app])+([Stamp app])+([Flap app])+([Seal app])+([Paint app])+([Nut
app])+([Sillicone app])+([Jet melt app])+([Spray app])+([Lead assy
Tube Cable tie length])+([Others]) AS Expr1, ([Expr1])/([OK
Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan Line].[Striking
II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise], [AC Fan
Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan
Line].[Slow Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi
Lo Current], [AC Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come
out], [AC Fan Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC
Fan Line].Intermittent, [AC Fan Line].[Missing Parts], [AC Fan
Line].[re missing], [AC Fan Line].[Extra Parts], [AC Fan Line].[re
extra], [AC Fan Line].[Wrong Parts], [AC Fan Line].[re wrong], [AC
Fan Line].[Vent Hous App], [AC Fan Line].[re vent], [AC Fan
Line].[Prop Imp App], [AC Fan Line].[re prop], [AC Fan Line].[Lead
assy Tube Cable tie App], [AC Fan Line].[re lsa], [AC Fan
Line].[name Plate App], [AC Fan Line].[re np], [AC Fan Line].[Label
Barcode App], [AC Fan Line].[re barcode], [AC Fan Line].[Screw Hole
Size], [AC Fan Line].[re size], [AC Fan Line].[Screw App], [AC Fan
Line].[re screw], [AC Fan Line].[Conn Pin App], [AC Fan Line].[re
conn], [AC Fan Line].[Metal Plate Case Cover App], [AC Fan
Line].[re metal], [AC Fan Line].[Stamp App], [AC Fan Line].[re
stam], [AC Fan Line].[Flap App], [AC Fan Line].[re flap], [AC Fan
Line].[Seal App], [AC Fan Line].[re seal], [AC Fan Line].[Paint
App], [AC Fan Line].[re paint], [AC Fan Line].[Nut App], [AC Fan
Line].[re nut], [AC Fan Line].[sillicone App], [AC Fan Line].[re
sillione], [AC Fan Line].[Jet Melt App], [AC Fan Line].[re
jetmelt], [AC Fan Line].[Spray App], [AC Fan Line].[re sparay], [AC
Fan Line].[Lead Asy Tube Cable tie Length], [AC Fan Line].[re
dimensi], [AC Fan Line].Others, [AC Fan Line].[re others], [AC Fan
Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove
that and see if it works. If you still have problems, and are
willing, post the SQL of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and
it's the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of
your form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left
hand of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds
these values?

Or do you have three columns and you want a total of the three
in each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that
hold the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a
part of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I
am having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am
trying to get the totals of these columns to appear in a
separate field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this
problem solved as soon as possible.

If you have a Continuous Form and you want to sum the values
in one field ("column"), put a textbox in the Form's Footer
(make the footer visible using the View menu option); set
its Control Source property to

=Sum([fieldname])

using the field name in the query upon which the form is
based.

This sum should generally NOT be stored in any table field.
Just recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]



  #15  
Old December 14th, 2006, 11:12 AM posted to microsoft.public.access.gettingstarted
chooriang
external usenet poster
 
Posts: 17
Default How to perform mathematical operations in an Access form

Thank's Joan,
I have figured it out.I made a mistake by never specified the default value
to zero for the field where set to number.
Now it works.
Thank's for the input

"Joan Wild" wrote in message
...
Then likely, as Doug suggested, you have null values in some of those
fields. Null + 1 = Null

Use the formula he suggested:

Expr1:Nz([A],0)+Nz([b],0)+Nz([C],0)+Nz([D],0)+Nz([E],0)+Nz([F],0)+Nz([G],0)+
Nz([H],0)+Nz([i],0)+Nz([J],0)[i]


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Joan,
it still can't be figured out.
I have removed the'sum' and rebuild the expression
No error message appear and there were no parameter value requesition.
But,It still can't be calculated.The field is blank,no result appear.

"Joan Wild" wrote in message
...
Remove the 'Sum' at the start of Expr1


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I
mean re is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function],
[AC Fan Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan
Line].Line, [AC Fan Line].[RoHS Status], [AC Fan Line].[OK
Quantity], Sum([Striking])+([Striking II])+([BB])+([Race
Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock NG])+([No
Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable
tie app])+([Name Plate app])+([Label Barcode app])+([Screw hole
size])+([Screw app])+([Conn Pin app])+([Metal plate,Case,Cover
app])+([Stamp app])+([Flap app])+([Seal app])+([Paint app])+([Nut
app])+([Sillicone app])+([Jet melt app])+([Spray app])+([Lead assy
Tube Cable tie length])+([Others]) AS Expr1, ([Expr1])/([OK
Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan Line].[Striking
II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise], [AC Fan
Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan
Line].[Slow Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi
Lo Current], [AC Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come
out], [AC Fan Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC
Fan Line].Intermittent, [AC Fan Line].[Missing Parts], [AC Fan
Line].[re missing], [AC Fan Line].[Extra Parts], [AC Fan Line].[re
extra], [AC Fan Line].[Wrong Parts], [AC Fan Line].[re wrong], [AC
Fan Line].[Vent Hous App], [AC Fan Line].[re vent], [AC Fan
Line].[Prop Imp App], [AC Fan Line].[re prop], [AC Fan Line].[Lead
assy Tube Cable tie App], [AC Fan Line].[re lsa], [AC Fan
Line].[name Plate App], [AC Fan Line].[re np], [AC Fan Line].[Label
Barcode App], [AC Fan Line].[re barcode], [AC Fan Line].[Screw Hole
Size], [AC Fan Line].[re size], [AC Fan Line].[Screw App], [AC Fan
Line].[re screw], [AC Fan Line].[Conn Pin App], [AC Fan Line].[re
conn], [AC Fan Line].[Metal Plate Case Cover App], [AC Fan
Line].[re metal], [AC Fan Line].[Stamp App], [AC Fan Line].[re
stam], [AC Fan Line].[Flap App], [AC Fan Line].[re flap], [AC Fan
Line].[Seal App], [AC Fan Line].[re seal], [AC Fan Line].[Paint
App], [AC Fan Line].[re paint], [AC Fan Line].[Nut App], [AC Fan
Line].[re nut], [AC Fan Line].[sillicone App], [AC Fan Line].[re
sillione], [AC Fan Line].[Jet Melt App], [AC Fan Line].[re
jetmelt], [AC Fan Line].[Spray App], [AC Fan Line].[re sparay], [AC
Fan Line].[Lead Asy Tube Cable tie Length], [AC Fan Line].[re
dimensi], [AC Fan Line].Others, [AC Fan Line].[re others], [AC Fan
Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove
that and see if it works. If you still have problems, and are
willing, post the SQL of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and
it's the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of
your form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left
hand of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds
these values?

Or do you have three columns and you want a total of the three
in each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that
hold the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a
part of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I
am having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am
trying to get the totals of these columns to appear in a
separate field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this
problem solved as soon as possible.

If you have a Continuous Form and you want to sum the values
in one field ("column"), put a textbox in the Form's Footer
(make the footer visible using the View menu option); set
its Control Source property to

=Sum([fieldname])

using the field name in the query upon which the form is
based.

This sum should generally NOT be stored in any table field.
Just recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]





  #16  
Old December 15th, 2006, 03:33 AM posted to microsoft.public.access.gettingstarted
chooriang
external usenet poster
 
Posts: 17
Default Next topic: Chart

Hope somebody would like to help,
From the previous messages I'm finish about the form.
Now I want to make a rejection chart base to the data inputted from my form.
Especially ,the data source come from the filtered record.
The filter,such as for 'A model' in periode of 'between (date) and (date)'
or for all model in a certainly periode.
So,what should I do next.

"chooriang" wrote in message
...
Thank's Joan,
I have figured it out.I made a mistake by never specified the default

value
to zero for the field where set to number.
Now it works.
Thank's for the input

"Joan Wild" wrote in message
...
Then likely, as Doug suggested, you have null values in some of those
fields. Null + 1 = Null

Use the formula he suggested:


Expr1:Nz([A],0)+Nz([b],0)+Nz([C],0)+Nz([D],0)+Nz([E],0)+Nz([F],0)+Nz([G],0)+[i]
Nz([H],0)+Nz([i],0)+Nz([J],0)


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Joan,
it still can't be figured out.
I have removed the'sum' and rebuild the expression
No error message appear and there were no parameter value requesition.
But,It still can't be calculated.The field is blank,no result appear.

"Joan Wild" wrote in message
...
Remove the 'Sum' at the start of Expr1


--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Thank's a lot cause wanna help
Let see,Registration No set t 'number' and that is the PK
Date is set to date and time.
'Model' until field 'RoHS Status' are set to 'text'
Others,field which are start with 're'also set to text
Example: there is field 're missing' post of 'missing parts' field,I
mean re is remark
So,what's wrong with that.

SELECT [AC Fan Line].[Registration No], [AC Fan Line].Date, [AC Fan
Line].Model, [AC Fan Line].[Lot No], [AC Fan Line].[OQC Function],
[AC Fan Line].[OQC Appearance], [AC Fan Line].Shift, [AC Fan
Line].Line, [AC Fan Line].[RoHS Status], [AC Fan Line].[OK
Quantity], Sum([Striking])+([Striking II])+([BB])+([Race
Noise])+([Vibration])+([C Wave])+([Sensor])+([Lock NG])+([No
Rotate])+([Slow Rotate])+([Dead Point])+([Hi Lo Current])+([Hi Lo
RPM])+([Prop Imp come out])+([Prop Imp touch])+([PCB
Up])+([Intermittent])+([Missing Parts])+([Extra parts])+([Wrong
parts])+([Vent Hous app])+([Prop Imp app])+([Lead assy,Tube,cable
tie app])+([Name Plate app])+([Label Barcode app])+([Screw hole
size])+([Screw app])+([Conn Pin app])+([Metal plate,Case,Cover
app])+([Stamp app])+([Flap app])+([Seal app])+([Paint app])+([Nut
app])+([Sillicone app])+([Jet melt app])+([Spray app])+([Lead assy
Tube Cable tie length])+([Others]) AS Expr1, ([Expr1])/([OK
Quantity]) AS Expr2, [AC Fan Line].Striking, [AC Fan Line].[Striking
II], [AC Fan Line].[BB Noise], [AC Fan Line].[Race Noise], [AC Fan
Line].Vibration, [AC Fan Line].[Current Wave], [AC Fan Line].Sensor,
[AC Fan Line].[Lock Ng], [AC Fan Line].[No Rotation], [AC Fan
Line].[Slow Rotation], [AC Fan Line].[Dead Point], [AC Fan Line].[Hi
Lo Current], [AC Fan Line].[Hi Lo RPM], [AC Fan Line].[Prop Imp come
out], [AC Fan Line].[Prop Imp Touch], [AC Fan Line].[PCB Up], [AC
Fan Line].Intermittent, [AC Fan Line].[Missing Parts], [AC Fan
Line].[re missing], [AC Fan Line].[Extra Parts], [AC Fan Line].[re
extra], [AC Fan Line].[Wrong Parts], [AC Fan Line].[re wrong], [AC
Fan Line].[Vent Hous App], [AC Fan Line].[re vent], [AC Fan
Line].[Prop Imp App], [AC Fan Line].[re prop], [AC Fan Line].[Lead
assy Tube Cable tie App], [AC Fan Line].[re lsa], [AC Fan
Line].[name Plate App], [AC Fan Line].[re np], [AC Fan Line].[Label
Barcode App], [AC Fan Line].[re barcode], [AC Fan Line].[Screw Hole
Size], [AC Fan Line].[re size], [AC Fan Line].[Screw App], [AC Fan
Line].[re screw], [AC Fan Line].[Conn Pin App], [AC Fan Line].[re
conn], [AC Fan Line].[Metal Plate Case Cover App], [AC Fan
Line].[re metal], [AC Fan Line].[Stamp App], [AC Fan Line].[re
stam], [AC Fan Line].[Flap App], [AC Fan Line].[re flap], [AC Fan
Line].[Seal App], [AC Fan Line].[re seal], [AC Fan Line].[Paint
App], [AC Fan Line].[re paint], [AC Fan Line].[Nut App], [AC Fan
Line].[re nut], [AC Fan Line].[sillicone App], [AC Fan Line].[re
sillione], [AC Fan Line].[Jet Melt App], [AC Fan Line].[re
jetmelt], [AC Fan Line].[Spray App], [AC Fan Line].[re sparay], [AC
Fan Line].[Lead Asy Tube Cable tie Length], [AC Fan Line].[re
dimensi], [AC Fan Line].Others, [AC Fan Line].[re others], [AC Fan
Line].[Remark Catatan]
FROM [AC Fan Line];


"Joan Wild" wrote in message
...
Sounds like you still have a column using Sum(...) in it. Remove
that and see if it works. If you still have problems, and are
willing, post the SQL of the query (View, SQL)

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I tough I have done everything you've said and then
When trying to execute,a message appear...
"You tried to execute a query that does not include
the specified expression 'Registration No" as a part
of an aggregate function.

Registration No is a field where the data type set to number and
it's the PK of the table.

"Joan Wild" wrote in message
...
You can add a column to the query that is the recordsource of
your form. Expr1: [A]+[b]+[C]+[D]+[E]+[F]+[G]+[H]++[J]
Add a control to your form bound to Expr1

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
Hi,
I have about 10 column and I want to have the total at the left
hand of each rows.
The name?.Is that important.OK just make it A - J
and then......

"Joan Wild" wrote in message
...
You need to be clearer in what you want. Do you have a single
column, and you want the total at the bottom?
1
2
3
6

If you want this, what is the name of the field that holds
these values?

Or do you have three columns and you want a total of the three
in each row? 1 2 3 6
2 3 4 9
If you want this, what are the names of the three fields that
hold the values?

--
Joan Wild
Microsoft Access MVP

chooriang wrote:
John,
I have read your previous update for this subject but I still
can't figured it out.
I have made a text box on the footer area as you mentioned
before,then build it with 'Expression Builder'
But,it still doesn't work.It asking me the parameter value for
this field',cause I don't know,I just click OK.
Then when I enter some value it doesn't make a sense.

Note:*Does it influence,my PK is set to number and It isn't a
part of the formula.
"John Vinson" wrote in
message ...
On 2 Nov 2006 16:20:00 -0800, wrote:

I have been fairly successful in developing some forms. I
am having trouble getting a form to perform mathematical
operations, however.. For example, a form I am trying to
develop has a column where numbers are inputted. I am
trying to get the totals of these columns to appear in a
separate field. Can anyone give me some advice on this?

I have some manuals on order, but would like to get this
problem solved as soon as possible.

If you have a Continuous Form and you want to sum the values
in one field ("column"), put a textbox in the Form's Footer
(make the footer visible using the View menu option); set
its Control Source property to

=Sum([fieldname])

using the field name in the query upon which the form is
based.

This sum should generally NOT be stored in any table field.
Just recalculate it as needed.

If I'm misunderstanding your structure, please post back with
more details - such as the Recordsource property of the form,
what it is that you want summed, etc.

John W. Vinson[MVP]








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.