Use ADODB.Command to create a view
Sub CreateView()
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "CREATE VIEW vwClients " & _
"AS SELECT ClientID, CompanyName " & _
"FROM Clients"
cmd.Execute
End Sub
Related examples in the same category