Hello Guys,
Here is my code:
Private Sub cmdUpCert_Click()
'Dim rs As Recordset
Dim objUpCert As Object
Dim strFile As String
Dim strFolder As String
Dim varItem As Variant
'Set rs = CurrentDb.OpenRecordset("Qry_Renew", dbOpenDynaset, dbSeeChanges)
Set objUpCert = Application.FileDialog(3)
objUpCert.allowMultiSelect = True
If objUpCert.Show Then
For Each varItem In objUpCert.SelectedItems
strFile = Dir(varItem)
strFolder = Left(varItem, Len(varItem) - Len(strFile))
MsgBox "Folder" & strFolder & vbCrLf & "File: " & strFile
ProcDocs = strFolder + strFile
Next
End If
'Set rs = Nothing
Set objUpCert = Nothing
End Sub
When I run the code the dialog box open and I choose my document but then I get Error Code '-214735267 This Recordset is not updateable.:banghead:
Can someone please help me?
Thank you
Here is my code:
Private Sub cmdUpCert_Click()
'Dim rs As Recordset
Dim objUpCert As Object
Dim strFile As String
Dim strFolder As String
Dim varItem As Variant
'Set rs = CurrentDb.OpenRecordset("Qry_Renew", dbOpenDynaset, dbSeeChanges)
Set objUpCert = Application.FileDialog(3)
objUpCert.allowMultiSelect = True
If objUpCert.Show Then
For Each varItem In objUpCert.SelectedItems
strFile = Dir(varItem)
strFolder = Left(varItem, Len(varItem) - Len(strFile))
MsgBox "Folder" & strFolder & vbCrLf & "File: " & strFile
ProcDocs = strFolder + strFile
Next
End If
'Set rs = Nothing
Set objUpCert = Nothing
End Sub
When I run the code the dialog box open and I choose my document but then I get Error Code '-214735267 This Recordset is not updateable.:banghead:
Can someone please help me?
Thank you