can you help me with this.
I'm trying to use a paramter SQL pass thru query from an access db using QueryDef.
To prove the pooint I'm using the Northwind DB supplied.
Private Sub Text0_AfterUpdate()
On Error GoTo ErrStuff
Dim db As Database
Set db = CurrentDb()
Dim rs As Recordset
Dim qdef As QueryDef
Set qdef = db.CreateQueryDef("")
qdef.Connect = "ODBC;DRIVER=SQL Server;SERVER=CROWTHORNXXX;UID=SA;PWD=XXX;DATABASE=Northwind;"
qdef.SQL = "CustOrderHist '" & Me.Text0 & "'"
Set rs = qdef.OpenRecordset()
MsgBox Err.Number & " " & Err.Description
if I run this code I keep getting
The Microsoft Jet database engine cannot find the input table or query 'MSysConf'. Make sure it exists and that its name is spelled correctly.
Now I understand that this is a table that would exist in the SQL database. I haven't created it nor do i wish to. I just want to be able to use a simple pass thru query with a parameter using access front end and sql back end.
Surely this is a simple task. but I can't get it to work. I feel it's something to do with the connect string. I've copied the connection string from a DSN taht I created.
Can anyone help?