Re: Calculations on report...



I thought I asked for the names of the fields in your report's record
source. You provided the "fields that are on the form that the user enters".
Are they the same? Do you have a field named "FORM"? Do some of your field
names begin with "frm_txt_"? You really have an old guy chasing his tail
since "frm" is generally a prefix given to form names and "txt" is generally
a prefix given to text box names.

You state frm_cmb_Province is selected on a form. Does this mean it isn't
bound to a field in a table or query?

--
Duane Hookom
MS Access MVP

"Newf via AccessMonster.com" <u24600@uwe> wrote in message
news:6571fc1a5114d@xxxxxx
Duane:
Thanks. Here are the fields that are on the form that the user enters.
These
fields can be null but they will not be all null.
FORM - entered by user
frm_txt_CFSA_Arrears - can be null
frm_txt_CFSA_Interest - can be null
frm_txt_CFPF_Arrears - can be null
frm_txt_CFPF_Interest - can be null
frm_txt_PBDA_CFSA - can be null
frm_txt_PBDA_CFPF - can be null
frm_txt_RRSP - can be null
frm_txt_GAPDA - can be null
frm_cmb_Province - user selects this on form

REPORT
rpt_txt_Totals = the totals of 4 fields (CFSA & CFPF) - calc working OK
rpt_txt_Tot_ROEC = rpt_txt_Totals
rpt_txt_Que_Tax is determined by ROEC

Here is the if statement I need to place on the report either in the on
open
event of from a push button (PRINT) on my form.
If frm_txt_RRSP <> 0 Then
rpt_txt_Fed_Tax = rpt_txt_Tot_ROEC * 0
If frm_cmb_Province = "QC" Then
rpt_txt_Que_Tax = rpt_txt_Tot_ROEC * .16
Else
rpt_txt_Que_Tax = rpt_txt_Tot_ROEC * .0
Endif
Else
If frm_cmb_Province = "QC" Then
If rpt_txt_ROEC > 5000 Then
rpt_txt_Que_Tax = rpt_txt_Tot_ROEC * .16
rpt_txt_Fed_Tax = rpt_txt_Tot_ROEC * .10
Else
rpt_txt_Que_Tax = rpt_txt_Tot_ROEC * .16
rpt_txt_Fed_Tax = rpt_txt_Tot_ROEC * .05
Endif
Else
rpt_txt_Fed_Tax = rpt_txt_Tot_ROEC * .10
rpt_txt_Que_Tax = rpt_txt_Tot_ROEC * 0
Endif
Endif

******SAMPLE*******
-------1--------
frm_txt_RSSP = 0.00
rpt_txt_Tot_ROEC = 1266.25
frm_cmb_Province = NL
(rpt_txt_Fed_Tax) 1266.25 * .10 = 126.63
(rpt_txt_Que_Tax) 1266.25 * 0 = 0


-------2----------
frm_txt_RRSP = 145.00
rpt_txt_Tot_ROEC = 466.45
frm_cmb_Province = QC
(rpt_txt_Fed_Tax) 466.45 * 0 = 0
(rpt_txt_Que_Tax) 466.45 * .16 = 74.63

------3---------
frm_txt_RRSP = 0.00
rpt_txt_Tot_ROEC = 5800.00
frm_cmb_Province = QC
(rpt_txt_Que_Tax) 5800.00 * .16 = 928.00
(rpt_txt_Fed_Tax) 5800.00 * .10 = 580.00


I hope this helps...

NEWF







Duane Hookom wrote:
Ok, tell us what the fields are from your report's record source, what
values need to be calculated, and how they are calculated. Some sample
records with calculated results would help us determine if we get the
calcs
correct.

Yes you did suggest but like I said I'm not sure how to. RRSP is stored
in
a
[quoted text clipped - 13 lines]
Newf
~Everyone needs a NEWFIE as a friend~

--
Newf
~Everyone needs a NEWFIE as a friend~

Message posted via http://www.accessmonster.com



.