-
I am using ADO and I am trying to find a Null value in my database. This works fine for searching for a field with a value
username = "ME"
Criteria = "Mnemonic = '" & UCase(username) & "'"
rs.Find Criteria, , adSearchForward, 1
But, soon as I search for a null value it can't find it. Help someone please!!!
Thanx!!!
-
Try this out:
Code:
username = "ME"
Criteria = "Mnemonic is null"
rs.Find Criteria, , adSearchForward, 1
Hope this helps
-
Nope! Run- Time Error! 3001
-
What type of DB are you using???
-
Access 97, with all the proper components.
Everything else works fine except the finding a null field in the table.
Thanx
-
I am not sure why it is not working, you could try a new recordset using:
Code:
SQL = "SELECT * FROM table where field1 is null"
rs.Open SQL,DB,adOpenForwardOnly, adLockReadOnly
if rs.eof = false then
'NULL VALUES
end if
Hope this helps
-
I get the same error when using your code!
Run-time error 3001!
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
Maybe the problem lies somewhere else if your code didn't work?. Thanx for your time on this!
-
I got it! Thanx for your help!!!!!