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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Runtime Error: 3146 4
Help with code 5
ODBC Call Error 2
Data entry with Leban RTF 0
Excel automation 2
Exort set of queries to excel 2
help with Code 1
Help with recordset 3

Top