Report Problem - What am I doing wrong?

Report Problem - What am I doing wrong?

Post by Todd D. Le » Thu, 07 Aug 2003 09:09:40


This is a very simple report:

The query grabs an Affiliation field with 5 choices as follows:

Affiliation A
Affiliation B
Affiliation C
Affiliation D
Affiliation E

and a Date field where I ask the user to choose a Start date and an End
date with the following criteria:

Between [Please enter start date] And [Please enter end date]

The report displays only the Affiliation field, which shows up as a
Combo Box (rather than a textbox) because a lookup table is used to
populate this field.

I have 5 Unbound Textboxes with the Control Sources set as follows:

=Abs(Sum(cboAffiliation="Affiliation A"))
=Abs(Sum(cboAffiliation="Affiliation B"))
=Abs(Sum(cboAffiliation="Affiliation C"))
=Abs(Sum(cboAffiliation="Affiliation D"))
=Abs(Sum(cboAffiliation="Affiliation E"))

Because I want to get a count of the number of records returned for each
individual affiliation.

I am having 2 problems, as follows:

1) Each Unbound textbox is returning a count of Zero(0), as a numeric of
course.

2) For some reason I am being asked to enter a parameter for the
Affiliation Combo Box after I enter the date criteria.

Please, tell me what I have done wrong.

Also, I would like to have the report display (in the report) the Start
Date and End Date that the user enters when running the report; if
possible.
 
 
 

Report Problem - What am I doing wrong?

Post by Duane Hook » Thu, 07 Aug 2003 12:36:59

1) I would undo all of the lookup field stuff but that is my opinion.
2) Is the value stored in the table actually text of a number like 1-5?
3) You can't Sum controls, you can Sum fields
=Abs(Sum([Affiliation]="Affiliation A"))
or
=Abs(Sum([Affiliation]=1))


--
Duane Hookom
MS Access MVP

 
 
 

Report Problem - What am I doing wrong?

Post by Duane Hook » Fri, 08 Aug 2003 02:31:58

Use a text box with a control source of:
="Between " & [Please enter start date] & " And " & [Please enter end date]


--
Duane Hookom
MS Access MVP
 
 
 

Report Problem - What am I doing wrong?

Post by Todd D. Le » Fri, 08 Aug 2003 11:10:53

In article < XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says...

Just what I needed; thanks Duane.