이 코드는 제가 어려움을 겪고있는 Access 2007 프로젝트의 코드입니다. 실제 평균 부분은 내가Access 2007 파일 선택기는 모든 행을 동일한 선택으로 바꿉니다.
DoCmd.RunSQL "Update Korut Set [PikkuKuva]=('" & varFile & "') ;"
사람이 좀 도와 주 시겠어요?`내가 지금 그것을 사용하는 경우,이 같은 모든 테이블을 업데이트 "단지 현재 양식을 업데이트"같은 것을 넣어해야하는 부분입니다 파일이 선택되었습니다.
전체 코드를 가공하십시오.
' This requires a reference to the Microsoft Office 11.0 Object Library.
Dim fDialog As Office.FileDialog
Dim varFile As Variant
Dim filePath As String
' Set up the File dialog box.
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
' Allow the user to make multiple selections in the dialog box.
.AllowMultiSelect = False
' Set the title of the dialog box.
.Title = "Valitse Tiedosto"
' Clear out the current filters, and then add your own.
.Filters.Clear
.Filters.Add "All Files", "*.*"
' user picked at least one file. If the .Show method returns
' False, the user clicked Cancel.
If .Show = True Then
' Loop through each file that is selected and then add it to the list box.
For Each varFile In .SelectedItems
DoCmd.SetWarnings True
DoCmd.RunSQL "Update Korut Set [PikkuKuva]=('" & varFile & "') ;"
Next
Else
MsgBox "You clicked Cancel in the file dialog box."
End If
End With
그것은 여기 둘 없습니다도이 문제에 관해서 만 교체 : 양식은 텍스트가 들어, 인용 부호가 필요합니다 "msoFileDialogFilePic ker "를"3 "으로 설정하면 참조가 필요하지 않습니다. –