Sometimes I get and error on red line below.
Error>> Run time Error '3020'
Update or CancelUpdate without Addnew or Edit
It only seems to happen when the data has a comma in it like
Clearwater Grande Condominium, LLC
DougP
< I Built one
Error>> Run time Error '3020'
Update or CancelUpdate without Addnew or Edit
It only seems to happen when the data has a comma in it like
Clearwater Grande Condominium, LLC
Code:
Private Sub List2_Click()
Dim rs As Recordset
Dim strData As String
Dim Conn2 As ADODB.Connection
Dim Rs1 As ADODB.Recordset
Dim SQLCode As String
Set Conn2 = CurrentProject.Connection
Set Rs1 = New ADODB.Recordset
Set rs = Me.[Company subform].Form.RecordsetClone
strData = "[Name] like " & Chr(34) & Left(Me.List2.Value, 10) & "*" & Chr(34)
rs.FindFirst strData
If rs.NoMatch Then
Label4.Caption = "No record found! " & Left(Me.List2.Value, 10)
SQLCode = "INSERT INTO FoldersNotFound ( Folder ) SELECT " & Chr(34) & Me.List2.Value & Chr(34) & " AS Expr1;"
Rs1.Open SQLCode, Conn2, adOpenStatic, adLockOptimistic
' close it this way
Set Rs1 = Nothing
Set Conn2 = Nothing
Me.[FoldersNotFound subform].Requery
Else
Me.[Company subform].Form.Bookmark = rs.Bookmark
'set the field "folder location" in the Company sub form
[COLOR=red]Me.[Company subform]!FolderLocation = Me.List2.Value[/color]
End If
DougP
< I Built one