Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with DAO OpenRecordset

Status
Not open for further replies.

SantoBugito

Programmer
Jun 18, 2002
1
GB
I am creating a query in a access database, the call I use is

Set qdfNew = NewDB.CreateQueryDef("Summary Info", _
"SELECT [National Call Information].*, [International Call Information].*, [Network Call Information].*, [Total Call Stats].* FROM " & _
"[National Call Information], [Network Call Information], [Total Call Stats], [International Call Information]")

When I come to execute it later in the program using the following call

Set RS = condb.OpenRecordset("Summary Info", dbOpenSnapshot)

I get the following error

37000: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.

Has anybody got any idea why this is happening?

Thanks in Advance

Sean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top