Help Error 3146 ODBC call fail

S

SF

Hi,

I have the following code in Access 2003 link thru ODBC to SQL Server. This
code below give me an error 3146.

Could someone advice!



Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim qdf As DAO.QueryDef

DoCmd.Hourglass True
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblEvents", dbOpenDynaset, dbSeeChanges)

With rst
.AddNew
![EventUnitID] = 20
![EventOrgID] = Me.EventOrgID
![EventActivity] = Me.EventActivity
![EvenTypeID] = Me.EvenTypeID
![EventDate] = Me.EventDate
![Venus] = Me.Venus
![DateUpdated] = Now()
![Owner] = CurrentUser()
![DateCreated] = Now()
![CreatedBy] = CurrentUser()
.Update ================> Error occurs here!!!
.Bookmark = .LastModified
ZZNAV_CURRENTID = ![EventID]

End With
rst.Close

Set qdf = dbs.QueryDefs("AddTempParticipant")
qdf.Execute dbFailOnError
DoCmd.Hourglass False
DoCmd.Close

SF
 
Top