N
Newf via AccessMonster.com
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
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 said: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.
[quoted text clipped - 13 lines]Yes you did suggest but like I said I'm not sure how to. RRSP is stored in
a