L
leen
i got a problem with database..when i trying to link the images from
1folder to database using vba coding i've got error 438"object doesnt
support this property or method"....this the code:
Option Compare Database
Option Explicit
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub cmdLOAD_Click()
Dim MyFolder As String
Dim MyExt As String
Dim MyPath As String
Dim MyFile As String
Dim strCriteria As String
MyFolder = Me.SearchFolder ------------->i've got error 438 here!
' Get the search path.
MyPath = MyFolder & "\" & "*." & [Searchextension]------------->i've
got error 438 here!
' Get the first file in the path containing the file extension.
MyFile = Dir(MyPath, vbNormal)
Do While Len(MyFile) <> 0
[OLEPATH] = MyFolder & "\" & MyFile
[OLEFILE].Class = [OLEclass]
[OLEFILE].OLETypeAllowed = acOLELinked
[OLEFILE].SourceDoc = [OLEPATH]
[OLEFILE].Action = acOLECreateLink
' Check for next OLE file in the folder.
MyFile = Dir
' Go to new record on form.
DoCmd.RunCommand acCmdRecordsGoToNew
Loop
End Sub
can anyone help me..i'm blur..
1folder to database using vba coding i've got error 438"object doesnt
support this property or method"....this the code:
Option Compare Database
Option Explicit
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub cmdLOAD_Click()
Dim MyFolder As String
Dim MyExt As String
Dim MyPath As String
Dim MyFile As String
Dim strCriteria As String
MyFolder = Me.SearchFolder ------------->i've got error 438 here!
' Get the search path.
MyPath = MyFolder & "\" & "*." & [Searchextension]------------->i've
got error 438 here!
' Get the first file in the path containing the file extension.
MyFile = Dir(MyPath, vbNormal)
Do While Len(MyFile) <> 0
[OLEPATH] = MyFolder & "\" & MyFile
[OLEFILE].Class = [OLEclass]
[OLEFILE].OLETypeAllowed = acOLELinked
[OLEFILE].SourceDoc = [OLEPATH]
[OLEFILE].Action = acOLECreateLink
' Check for next OLE file in the folder.
MyFile = Dir
' Go to new record on form.
DoCmd.RunCommand acCmdRecordsGoToNew
Loop
End Sub
can anyone help me..i'm blur..