problem when load image files to database..

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"..actually i have to link 38000images
to the database....this is the code which i've try :

Option Compare Database
Option Explicit



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.. if there are another solution..plz
inform me...ASAP..plz..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top