NevilleT
2009-06-03 00:50:01 UTC
I have a form that uses VBA to insert a record. Using an Access backend it
works fine. Using SQL Server, it does not work at all. No record created.
No error messages. Firstly I generate a string (strSQL) which I printed
using debug.print.
INSERT into tblTask(MSPID, ProjectNo) VALUES(1, 1);
I then have the following code.
Set dbs = CurrentDb
Set qdf = dbs.CreateQueryDef("", strSQL) ' Create
new QueryDef.
qdf.Execute dbSeeChanges
' Run the insert query
I suspect it is something wrong in how I set up SQL rather than the app.
Any suggestions?
works fine. Using SQL Server, it does not work at all. No record created.
No error messages. Firstly I generate a string (strSQL) which I printed
using debug.print.
INSERT into tblTask(MSPID, ProjectNo) VALUES(1, 1);
I then have the following code.
Set dbs = CurrentDb
Set qdf = dbs.CreateQueryDef("", strSQL) ' Create
new QueryDef.
qdf.Execute dbSeeChanges
' Run the insert query
I suspect it is something wrong in how I set up SQL rather than the app.
Any suggestions?