Loop through all of the records in the recordset for non-null value : IsNull « Data Type Functions « VBA / Excel / Access / Word






Loop through all of the records in the recordset for non-null value

 
Sub LoopProjects()
    Dim rst As ADODB.Recordset
    Set rst = New ADODB.Recordset

    rst.Open "Employees", CurrentProject.Connection

    Do Until rst.EOF
        Debug.Print rst!Title, rst!City
        If IsNull(rst!Region) Then
            Debug.Print "No Value!!"
        End If
        rst.MoveNext
    Loop
End Sub

 








Related examples in the same category

1.Working with Null
2.If...Then...Else and IsNull