C
Chuck216
I Have an Access 2003 front end linked to a SQL 2005 back end. I’m trying to
run this code and get an ODBC Call Failed error 3146 at the ".Update"
Any help with this will be greatly appreciated
Chuck
____________________________________________________________________
Private Sub Command112_Click()
Dim db As DAO.Database
Dim rst As DAO.Recordset
If DCount("*", "tblDownTime", "DateValue([Date])=Date() AND [Ride] =
'Wings ' AND [Safety] is not Null") > 0 Then
'Do nothing
Else
Set db = DBEngine(0)(0)
Set rst = db.OpenRecordset(cTableDownTimeCBO, dbOpenDynaset, dbSeeChanges)
With rst
.AddNew
![Date] = Date
![TimeDown] = Time()
![Ride] = "Wings"
![Classification] = "Weather"
![Reason] = "Weather"
.Update --------------------------------------------Here is where I get
the Run Time error 3146 ODBC Call Failed
End With
End If
Exit_Sub:
On Error Resume Next
rst.Close
Set rst = Nothing
Set db = Nothing
End Sub
run this code and get an ODBC Call Failed error 3146 at the ".Update"
Any help with this will be greatly appreciated
Chuck
____________________________________________________________________
Private Sub Command112_Click()
Dim db As DAO.Database
Dim rst As DAO.Recordset
If DCount("*", "tblDownTime", "DateValue([Date])=Date() AND [Ride] =
'Wings ' AND [Safety] is not Null") > 0 Then
'Do nothing
Else
Set db = DBEngine(0)(0)
Set rst = db.OpenRecordset(cTableDownTimeCBO, dbOpenDynaset, dbSeeChanges)
With rst
.AddNew
![Date] = Date
![TimeDown] = Time()
![Ride] = "Wings"
![Classification] = "Weather"
![Reason] = "Weather"
.Update --------------------------------------------Here is where I get
the Run Time error 3146 ODBC Call Failed
End With
End If
Exit_Sub:
On Error Resume Next
rst.Close
Set rst = Nothing
Set db = Nothing
End Sub