Option Compare Database Private Sub Command0_Click() Mkt End Sub Public Function Mkt() Dim MyFolder As String Dim MyExt As String Dim MyPath As String Dim MyFile As String Dim strCriteria As String MyFolder = E: ' Get the search path. MyPath = "New folder(2)" ' 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 Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)