Query Problem

J

James

Hello there I have the following SQL....

-----------------------------------------------------------

SELECT Count(1) AS ReturnCount, 100*Count(1)/(Select Count
(*) FROM tblResponses) AS ReturnPercentage
FROM tblResponses
WHERE ((([Gender])=[Forms]![frmqry]![cboGender]) And
(([Question])=[Forms]![frmqry]![cboQuestion]) And
(([tblResponses].[Answer])=[Forms]![frmqry]![cboAnswer]));

-----------------------------------------------------------

Where by when I run the query from the form with values in
the cboboxes it asks me to put in the Gender and the
Question again does anyone know why this is?

Also I have tried the following code:

-----------------------------------------------------------

SELECT Count(1) AS ReturnCount, 100*Count(1)/(Select Count
(*) FROM tblResponses) AS ReturnPercentage
FROM tblResponses
WHERE ((([tblResponses].Gender)=[Forms]![frmqry]!
[cboGender]) And (([tblResponses].Question)=[Forms]!
[frmqry]![cboQuestion]) And (([tblResponses].[Answer])=
[Forms]![frmqry]![cboAnswer]));

-----------------------------------------------------------


And I still get the same problem. How can I get it to
recognise the values? When I type in the values which are
correct to the table I get no results returened even
thought there is data in the table.

Many Thanks or any assistence given

James
 

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