
Originally Posted by
ItsMe
Edit: I just realized you are using ADO. The rules a little different for ADO and I though you were using DAO
Your isnull() function should do the job of determining wheather or not there is a value in the text field. You could add another validation for empty string
if me.datefield = "" then
For unbound textboxes, if the user deletes the value before continuing, it will no longer be null, it will be an empty string. This is also true for controls bound to certain field data types like text data types.
As for validation of your recordset in your DAO. You can use the .EOF. You can also use the .Recordcount
You do not need always need to .Movefirst or .Movelast. For instance, .Findfirst will populate a recordset. So you will not need to .Movelast and then .Findfirst.
To get a recordcount you can
Dim intCount as integer
.MoveFirst
intcount = .Recordcount
msgbox intcount
if intcount <=0 then
set rs = nothing
exit sub
end if