How do i do additions and subtractions on Micsosoft Access?

F

fore2558

in microsoft access in my tables database, i have 4 fields. Name, Gross
Score, Course Handicap, and Net Score. How do calculate Net score? I would
like to enter Gross Score and Course Handicap and it to automaticly calculate
the difference in net Score. (example Gross Score - Course Handicap should =
Net score). is there an easy formula and where would I enter this
information. i have already created Queries for my reports to show net score.
 
K

Ken Snell [MVP]

Don't store the Net Score. Calculate it in your query instead.

SELECT [Name], ([Gross Score] - [Course Handicap]) AS [Net Score]
FROM YourTableName;

Also, do not use Name as the name of a field. It and many other words are
reserved words in ACCESS, and can create serious confusion for ACCESS and
Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763
 
F

fore2558

Sorry but I am still having troubles. Under which column would i type the
info? For some reason I am really lost. I have also changed the [Name] to
LastName,FI
can you send me a step by step instructions?

Ken Snell said:
Don't store the Net Score. Calculate it in your query instead.

SELECT [Name], ([Gross Score] - [Course Handicap]) AS [Net Score]
FROM YourTableName;

Also, do not use Name as the name of a field. It and many other words are
reserved words in ACCESS, and can create serious confusion for ACCESS and
Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763

--

Ken Snell
<MS ACCESS MVP>



fore2558 said:
in microsoft access in my tables database, i have 4 fields. Name, Gross
Score, Course Handicap, and Net Score. How do calculate Net score? I would
like to enter Gross Score and Course Handicap and it to automaticly
calculate
the difference in net Score. (example Gross Score - Course Handicap should
=
Net score). is there an easy formula and where would I enter this
information. i have already created Queries for my reports to show net
score.
 
K

Ken Snell [MVP]

Type what info? I posted an example of the query's SQL statement that you
would use for calculating the Net Score value from the table's other two
fields.

You would create a query that uses this SQL statement (after changing the
field names and the table name to the real names), then you could use this
query as the recordsource for your report.

If you want to create this query in design view (QBE) window, put the table
in the window above the grid. Drag the "name" field onto the grid. In the
next open "Field:" box, type this expression (this creates a "calculated"
field in the query):
Net Score: [Gross Score] - [Course Handicap]

--

Ken Snell
<MS ACCESS MVP>



fore2558 said:
Sorry but I am still having troubles. Under which column would i type the
info? For some reason I am really lost. I have also changed the [Name] to
LastName,FI
can you send me a step by step instructions?

Ken Snell said:
Don't store the Net Score. Calculate it in your query instead.

SELECT [Name], ([Gross Score] - [Course Handicap]) AS [Net Score]
FROM YourTableName;

Also, do not use Name as the name of a field. It and many other words are
reserved words in ACCESS, and can create serious confusion for ACCESS and
Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763

--

Ken Snell
<MS ACCESS MVP>



fore2558 said:
in microsoft access in my tables database, i have 4 fields. Name, Gross
Score, Course Handicap, and Net Score. How do calculate Net score? I
would
like to enter Gross Score and Course Handicap and it to automaticly
calculate
the difference in net Score. (example Gross Score - Course Handicap
should
=
Net score). is there an easy formula and where would I enter this
information. i have already created Queries for my reports to show net
score.
 

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