Execute the view : View « Access « VBA / Excel / Access / Word






Execute the view

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

    rst.ActiveConnection = CurrentProject.Connection
    rst.CursorType = adOpenStatic
    rst.Open "vwClients"
    MsgBox rst.RecordCount
End Sub

 








Related examples in the same category

1.Create view
2.Creating a View Based on a Table with SQL command
3.Generating a List of Saved Views
4.Deleting a View with SQL command