Help with Calculated Field

  • Thread starter Thread starter Matt Howard
  • Start date Start date
M

Matt Howard

I know there has to be someone here who can help me with
what I'm sure is a simple problem.

I'm trying to make a query that will count the number of
records when a criteria is given to limit the records.
The problem I run into is when I create my calculated
field. In the Total box for my table field is set to
Group By and the calculated field is set to Count. I get
a "Enter Parameter Value" dialog box and if I don't enter
something it won't count the records. Apparently, it lets
me type whatever I want and it doesn't affect the count.
Any suggestions?

Thanks,
Matt
 
I know there has to be someone here who can help me with
what I'm sure is a simple problem.

I'm trying to make a query that will count the number of
records when a criteria is given to limit the records.
The problem I run into is when I create my calculated
field. In the Total box for my table field is set to
Group By and the calculated field is set to Count. I get
a "Enter Parameter Value" dialog box and if I don't enter
something it won't count the records. Apparently, it lets
me type whatever I want and it doesn't affect the count.
Any suggestions?

Please post the SQL view of your query.
 
Here is the SQL View:

SELECT tblCount.Subject, Count([SubjectTotal]) AS Total
INTO tblAuto
FROM tblCount
GROUP BY tblCount.Subject
HAVING (((tblCount.Subject)="auto assistance" Or
(tblCount.Subject)="jumpstart" Or (tblCount.Subject)="car
let-in"));

I'm not sure what's wrong. Any help is appreciated.

Thanks,
Matt
 
Here is the SQL View:

SELECT tblCount.Subject, Count([SubjectTotal]) AS Total
INTO tblAuto
FROM tblCount
GROUP BY tblCount.Subject
HAVING (((tblCount.Subject)="auto assistance" Or
(tblCount.Subject)="jumpstart" Or (tblCount.Subject)="car
let-in"));

Change the HAVING to WHERE for one thing - but do you have a field in
tblCount named SubjectTotal? I'd guess you don't, and that's what it's
prompting for. If you want to just count how many records there are
for each subject replace [SubjectTotal] with an asterisk *.
 
Back
Top