Hi
I've a problem creating and executing a view using VBA.
This is my code:
Dim cmd As New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "CREATE VIEW TEST AS SELECT * FROM MYTABLE"
cmd.Execute
Set cmd = Nothing
DoCmd.OpenView "TEST", acNormal, acEdit
When I execute this code, Access can't find the new view and show an error message box (error code 7874).
I use MSDE 2000 SP3 and Ms Access 2000 SP3.
Anyone can help me?
Thanks
Luca
I've a problem creating and executing a view using VBA.
This is my code:
Dim cmd As New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "CREATE VIEW TEST AS SELECT * FROM MYTABLE"
cmd.Execute
Set cmd = Nothing
DoCmd.OpenView "TEST", acNormal, acEdit
When I execute this code, Access can't find the new view and show an error message box (error code 7874).
I use MSDE 2000 SP3 and Ms Access 2000 SP3.
Anyone can help me?
Thanks
Luca