Help with Calculated Field

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
 
J

John Vinson

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.
 
M

Matt Howard

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
 
J

John Vinson

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 *.
 

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