Well there isn't really any code.
Asumng you have pubs database on SQL Server
Create a new query
Cancel the tables dialog box
Go to the Query menu and choose PassThrough
Put the SQL in
SELECT * from authors
Open the properties dialog and enter a valid ODBC connection string
Test the query and save when it works (qPassThrough)
Create a new query
Select qPassThrough from the dialog
Add all the fields to the grid
Go to the Query menu and choos Make Table
Enter a name for the new table (dbo_authors)
Run the query (you can check the SQL to see what is produced)
Save the Query (qmDbo_Authors)
Check the dbo_authors table has been created
VBA code to run this then becomes something like
Function MakeDbo_Authors()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Set db = CurrentDb
Set qdf = db.QueryDefs("qmDbo_Authors")
qdf.Execute
Set qdf = Nothing
Set db = Nothing
End Function
--
Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi Terry,
thx for the mail. Could you please provide some coded example?
Thx®ards,
Peter
Terry Kreft wrote: Yes it is.
You create your local table
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in an append query to append to
your local table.
Or
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in a make table query to create
your local table.
--
Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com... Hi,
I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible?
Can somebody provide an example?
Thanks®ards!
Peter