Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CALCULATIONS IN ACCESS '97.

Status
Not open for further replies.

Gemini07306

Technical User
Jun 25, 2003
15
US
Dear Members,
I have a serious problem:
I have two tables:
Payment_history:
===========================================================
A | B | C | D | E
20.00 | 25.00 | 20.00 | 7/25/2003 |

Report_File:
===========================================================
gross | taxed | check |
contribution | amount | date |
0.00 | 0.00 | 7/25/2003|

This is my problem: gross contribution should be:A+B+C+E
taxed amount should be: A
Check date should be: 2003

Report_File already has values
How can I move spaces or zeros to "Report_File"
and populate it With the new values?
Please respond to:
gixtian@nyct.com or giftx@juno.com




 
Hi

The first question has got to be "why would you want to do such a thing", from what you describe it can be achieved with a query (based on table payment_history) and a format statement, there is no need to have two tables,

In the query designer, choose the table Payment_History, make column GrossContribution as GrossContribution:A+B+C+E
make TaxedAmount:A
make CheckDate:Format(D,"yyyy")

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I think thi post is a "Winner". I have done such things in the past by using Expr1: etc in conjoining columns, but since these table already exist, I don't know if will be allowed to make modifications or add new columns. Besides, since an input hungry Form and Report already existed, I can just reference the new columns in the Form. How can I use the same Table for a Report that already exist. This report's data source is the original table.
Thank you.
gemini07306
Email: giftx@juno.com
CC: gixtan@nyct.com
 
Hi

We are not talking about adding new columns to a table, we are talking about adding new columns to a query.

It is not problem (within certain limits) to add new columns to a query, and hence to an existing report (or form).



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Ken,
how about spacing out the old values from the form/report before accepting new data inside the form/report?
How do I accomplish this?
thanks a mil.
gemini07306
 
Hi

I am not sure I understand what you mean, the answer seems too simplistic:

You open the report in design view and move the columns with the mouse and/or Control:Arrow keys

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,
When I said 'space out', I didn't mean the report columns.
What I want to do is to refresh, "zero" out the current values inside the controls (textboxes) on the form so they can accept new data.
thnx.
 
Hi

The data is not held in the controls on teh report, it is presented or shown there, the data is held in the table(s)

You can set columns in the tables to zero using an update query

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
HATS OFF TO KEN REAY!!!
Hi Ken,
good morning (U.S. Time). I know you are absolutely correct about the data not being help in the form, and that the form is only a display tool.
My supervisor got the spec. all screwed up. His directives were to zero or space out the data in the form/report, but I think what he is implying is to zero out the values in the table columns so that they can be populated again with fresh data(values).

JUST CURIOUS:
SINCE I HAVE A TABLE1 AND AN EXTRACT1 FILE(WHICH ALSO HAS FIELDS IN ITS COLUMNS), AND I NEED TO MOVE SOME VALUES FROM TABLE1 COLUMNS INTO EXTRACT1 COLUMNS, USING VB CODES (DIM STATEMENTS/RECORDSETS), HOW CAN I ACCOMPLISH THAT?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top