MarcMellor
Programmer
I am a very amateur programmer trying to develop an educational assessment program. I need to count the number of questions (selected according to certain criteria)that are deposited in an Access database and display this number in a text box. So far I have this:
Dim QuestionCount As Integer
Data1.Recordsource = "SELECT COUNT(*) AS QuestionCount FROM_
QuestionsDatabase WHERE Subject = 'Biology'_
AND WHERE Module = '2' AND WHERE Level = '1'"
Text1.Text = QuestionCount
Subject, Module and Level are all fields.
Unfortunately this just generates a zero, even if I cut out all the criteria.
Where am I going wrong?
Dim QuestionCount As Integer
Data1.Recordsource = "SELECT COUNT(*) AS QuestionCount FROM_
QuestionsDatabase WHERE Subject = 'Biology'_
AND WHERE Module = '2' AND WHERE Level = '1'"
Text1.Text = QuestionCount
Subject, Module and Level are all fields.
Unfortunately this just generates a zero, even if I cut out all the criteria.
Where am I going wrong?