calculated control

G

Guest

Hi Everyone

I have a query that sums my totals for 2004 and 2005
Year,Total
I display in on continious form, so 2005 shows rigth under 2004.
I'd like to have a control that shows difference in totals between 2005 and
2004, and another one showing that difference as %.

How should I go about that?

Barb
 
G

Guest

Open the form in design view. Copy the textbox that displays your 2004 and
paste where you want the Difference. Edit the label. Click on the menu VIEW
- Properties. Click on the 2005 textbox and copy the information shown on
Control Source line. Click on the Difference textbox and edit the Control
Source line to look something like this --
=Sum([Your2004Data]) - Sum([Your2005Data])
This subtracts the 2005 from the 2004. Reverse it if you want to subtract
the 2004 from the 2005.
For the percent do the above copying the Difference textbox and pasting for
Percent. Edit the Control source to derive the percent.
=(Sum([Your2004Data]) - Sum([Your2005Data]))/Sum([Your2005Data])*100
 
G

Guest

Hi Karl
Can't do that. It's a continous form. My 2004 total and 2005 Total is the
same control called "txtTotal". I was thinking about DSum but I'm not sure
how it works. Then I would have two controls calculating DSum on 2004 and
other on 2005, but I can't get it to work.

sorry, I'm running in circles here

Barb

KARL DEWEY said:
Open the form in design view. Copy the textbox that displays your 2004 and
paste where you want the Difference. Edit the label. Click on the menu VIEW
- Properties. Click on the 2005 textbox and copy the information shown on
Control Source line. Click on the Difference textbox and edit the Control
Source line to look something like this --
=Sum([Your2004Data]) - Sum([Your2005Data])
This subtracts the 2005 from the 2004. Reverse it if you want to subtract
the 2004 from the 2005.
For the percent do the above copying the Difference textbox and pasting for
Percent. Edit the Control source to derive the percent.
=(Sum([Your2004Data]) - Sum([Your2005Data]))/Sum([Your2005Data])*100

Barb said:
Hi Everyone

I have a query that sums my totals for 2004 and 2005
Year,Total
I display in on continious form, so 2005 shows rigth under 2004.
I'd like to have a control that shows difference in totals between 2005 and
2004, and another one showing that difference as %.

How should I go about that?

Barb
 

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