
Signature
Brendan Reynolds
Access MVP
Thank you. It now looks like it's running, but it doesn't insert the record.
Could it be that something on the SQL Server side is not allowing updates.
> The SQL statement is the *first* argument to the RunSQL method, not the
> second argument. In other words, this ...
[quoted text clipped - 24 lines]
> > DoCmd.OpenForm StDocName, , , stLinkCriteria
> > DoCmd.Close acForm, stDocName2
Brendan Reynolds - 07 Nov 2006 15:23 GMT
Could be, but I'd expect an error message if that were the case. If you're
using 'On Error Resume Next' try commenting it out and see if you get an
error message. Otherwise, in the absence of any further information, I'm not
sure what to suggest.

Signature
Brendan Reynolds
Access MVP
> Thank you. It now looks like it's running, but it doesn't insert the
> record.
[quoted text clipped - 30 lines]
>> > DoCmd.OpenForm StDocName, , , stLinkCriteria
>> > DoCmd.Close acForm, stDocName2
Stefan Hoffmann - 07 Nov 2006 15:36 GMT
hi Sash,
> Thank you. It now looks like it's running, but it doesn't insert the record.
> Could it be that something on the SQL Server side is not allowing updates.
Use instead of DoCmd.RunSQL the following:
Dim db As DAO.Database
Set db = CurrentDb
db.Execute strSQLpat, dbFailOnError
MsgBox db.RecordsAffected
mfG
--> stefan <--