|
-
Nov 3rd, 2002, 11:35 AM
#1
Thread Starter
PowerPoster
Updating DB with bound controls
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
-
Nov 3rd, 2002, 01:56 PM
#2
Thread Starter
PowerPoster
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?
-
Nov 3rd, 2002, 06:28 PM
#3
Thread Starter
PowerPoster
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|