Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21136

How to seek a null value?

$
0
0
Hello everyone
I'm looking for a query that allows me to retrieve all the pupils who did not have marks in a given exam. (let's say they were absent) and display them on a listview.
I used this query but it did not give any results.
Code:

RS.Open "select  from Student_Table inner join Grades_Table on Student_Table.Id = Grades_Table.PID where exam ='""'", DB, adOpenStatic, adLockOptimistic
If RS.RecordCount = 0 Then
MsgBox " All the students have marks"
else.......

Now with this query I always get
Code:

MsgBox " All the students have marks"
eventhough some students do not have exam marks
thank you

Viewing all articles
Browse latest Browse all 21136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>