This is a perplexing one. The bound form will only let me update the 1st recordset in a table. The others give this error mess.
Insufficient key column for updating or refreshing
Printable View
This is a perplexing one. The bound form will only let me update the 1st recordset in a table. The others give this error mess.
Insufficient key column for updating or refreshing
I think it's only allowing the 1st record to update because I haven't told the DB to move the rs.
VB Code:
Private Sub cmdOK_click() Dim choice As Integer Dim rscomOES As Recordset Dim strISBN As String choice = MsgBox("This will Alter the Record." & _ " Do you wish to proceed?", vbYesNo) If choice = vbYes Then strISBN = txtISBN.Text deOES.rscomOES.Find "ISBN FROM Products", 1, adSearchForward If strISBN = "ISBN" Then deOES.rscomOES.Update frmProdDet.Hide Call frmWIMS.NewProd Else deOES.rscomOES.MoveNext End If End If End Sub
Can anyone give me a clue?
Ok, even though I'm talking to myself here, I'll have another go. I figured out that the recordset wasn't changing, and that's why I could only update the 1st record. I think I'm getting close with the code, but somethings is wrong with the search, or the SQL statement. Can anyone help me find it?Private Sub cmdOK_click()
VB Code:
Dim choice As Integer Dim rscomOES As Recordset Dim strISBN As String choice = MsgBox("This will Alter the Record." & _ " Do you wish to proceed?", vbYesNo) If choice = vbYes Then strISBN = txtISBN.Text deOES.rscomOES.Find "ISBN Like '" & _ strISBN & "'", 0, adSearchForward, adBookmarkFirst If strISBN = "ISBN" Then deOES.rscomOES.Update frmProdDet.Hide Call frmWIMS.NewProd End If End If End Sub