How to subtract two fields

G

ghost

Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me an error
Can any body help me
 
A

Al Campagna

ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
G

ghost

hi,
the type of fileds are numbers
i used "-" and i placed the calculation in unbound textbox
i got "Name#?" error

Al Campagna said:
ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


ghost said:
Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me an error
Can any body help me
 
M

molsonexpert

is your calculation preceded by an equal sign i.e. =[field1]-[field2]?

steve.

ghost said:
hi,
the type of fileds are numbers
i used "-" and i placed the calculation in unbound textbox
i got "Name#?" error

Al Campagna said:
ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that
calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


ghost said:
Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me
an error
Can any body help me
 
G

ghost

yes

molsonexpert said:
is your calculation preceded by an equal sign i.e. =[field1]-[field2]?

steve.

ghost said:
hi,
the type of fileds are numbers
i used "-" and i placed the calculation in unbound textbox
i got "Name#?" error

Al Campagna said:
ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that
calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me
an error
Can any body help me
 
J

John W. Vinson

Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me an error
Can any body help me

Please post the expression that you used and the error. It's a bit hard to see
what you've done wrong if we can't see what you've done.

Note also that your Form does not have fields. Your *table* has fields, which
may (or may not) be displayed in Controls on your form.

John W. Vinson [MVP]
 
A

Al Campagna

ghost,
Let's try once again... I wrote...
One or both of the control names in the calculation are incorrect, and there is no
control by that name.
With controls named [BasePrice] and [Qty], the following would create a #Name error...
= [BasePrce] * Qty
or
= [Base Price] * [Qty]
Check the Names of the Controls you are calculating upon vs. the Names in the actual
calculation.
And... never Name a calculated field the name of any element in that calculation.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


ghost said:
hi,
the type of fileds are numbers
i used "-" and i placed the calculation in unbound textbox
i got "Name#?" error

Al Campagna said:
ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


ghost said:
Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me an error
Can any body help me
 
G

ghost

Hi,
Would you please download the file and make the necessary
http://s16.quicksharing.com/v/2156604/sce.zip.html

I could not do it
Plz. Plz. Plz.
thanks!

Al Campagna said:
ghost,
Let's try once again... I wrote...
One or both of the control names in the calculation are incorrect, and there is no
control by that name.
With controls named [BasePrice] and [Qty], the following would create a #Name error...
= [BasePrce] * Qty
or
= [Base Price] * [Qty]
Check the Names of the Controls you are calculating upon vs. the Names in the actual
calculation.
And... never Name a calculated field the name of any element in that calculation.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


ghost said:
hi,
the type of fileds are numbers
i used "-" and i placed the calculation in unbound textbox
i got "Name#?" error

Al Campagna said:
ghost,
= [Field1] - [Field2]

A clear question gets a clear answer...
1. What "types" of fields are these?
2. What calculation did you use, and where did you place that calculation?
3. What error did you get?
4. What would be some sample values, and expected results?

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



Hi,
I have a form with two fields
Current and pervious
I made a textbox to subtract them and view the result but it gives me an error
Can any body help me
 
Top