
Insufficient base table information for updating or refreshing
Hello Christina
Just couple of points and questions
1) If you adUseClient, the only valid setting for cursor type property is
adOpenKeySet
2) There is plethora of SQL terms in your code. How are you retrieving data
from the table via adCmdTable or adCmText as the command type ?
3) SQLQuery is a recordset. then the update routine should be in case
adCmdTable
With Me.fgridRawMat
SQLQuery.Fields("QtyOnHand").Value =
SQLQuery.Fields("QtyOnHand").Value - CDbl((.TextMatrix(gInt1, Col_QtyDraw)))
SQLQuery.Update
End With
End Sub
But in case you are retrieving data via an SQL statement, then try using SQL
statement to update the record
NewValue = SQLQuery.Fields("QtyOnHand").Value - CDbl((.TextMatrix(gInt1,
Col_QtyDraw)))
UPDATE Table SET QtyOnHand ='" &str(NewValue) & "'"
If str(NewValue) does not work, try Mid(str(NewValue),2)
HTH
Sukesh
Quote:
> Hi Sukesh,
> Thanks for your response on my question.
> The code is as follow:
> Private Sub cmdOK_Click()
> SQL_SearchOpen
> If gBln_Found = True Then
> a300_Update_RawMat
> End If
> SQL_SearchClose
> end Sub
> Public Sub SQL_SearchOpen()
> SQLQuery.CursorLocation = adUseClient
> SQLQuery.Open sSQL, MyDatabase, adOpenDynamic, adLockOptimistic
> If SQLQuery.RecordCount > 0 Then
> gBln_Found = True
> Else
> gBln_Found = False
> End If
> End Sub
> Private Sub a300_Update_RawMat()
> With Me.fgridRawMat
> SQLQuery("QtyOnHand") = SQLQuery("QtyOnHand") -
CDbl((.TextMatrix(gInt1, Col_QtyDraw)))
Quote:
> SQLQuery.Update
> End With
> End Sub
> Public Function SQL_SearchClose()
> SQLQuery.Close
> End Function
> Regards,
> Christina
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!