Hey all,
Here is the situation...I have a drop down box where you select a project name. Then there is a button that you press that will import files from diffrent folders depending on the project you select in the Project drop down box.
The Project and the Path of the files are both found in one table.."Project_Path"..
This is what I have come up with but I knew from the start that it could not be as straight forward as this :
What is the correct way of doing this??
Help is needed..as if I can get to know this then alot can be done...
Regards to all,
DerickD
Here is the situation...I have a drop down box where you select a project name. Then there is a button that you press that will import files from diffrent folders depending on the project you select in the Project drop down box.
The Project and the Path of the files are both found in one table.."Project_Path"..
This is what I have come up with but I knew from the start that it could not be as straight forward as this :
Code:
Private Sub ImportClick()
Dim myPath
Dim myFiles
Dim myImportSpec
Set myPath = "SELECT Project_Path.Path FROM Project_Path WHERE (((Project_Path.Name)=" & Me![ProjectSelect] & "));"
Set myImportSpec = "SELECT Project_Path.Spec FROM Project_Path WHERE (((Project_Path.Name)=" & Me![ProjectSelect] & "));"
myFiles = Dir(myPath & "/*.*")
Do While myFiles = ""
DoCmd.TransferText acImportDelim, myImportSpec, "Temp Import", myFiles
' ** Some appending and sorting going on here **
Loop
MsgBox ("Done!!")
End Sub
What is the correct way of doing this??
Help is needed..as if I can get to know this then alot can be done...
Regards to all,
DerickD