How To Open A Dialog Box To Move Files Inside A Folder That Is Setup As Current Folder
Sep 2, 2015
I'm trying to automate a process of selecting a set of file/s and move them in a folder. When I click on a button, it should open a current folder that is setup in the code.
Lets say that I have a folder C:documents est, and very time I click on the button, it should open the dialog box with that path so I can select the files from another folder, drag them there and they will be saved in that folder.
This will form part of wider automation that will send an email stating that those file/s where placed in that folder.
I have in the same form where the button is placed, 3 check boxes that needs to be passed to the email as well that one or all the files where placed in the folder.
View Replies
ADVERTISEMENT
Mar 16, 2015
I'm trying to open a folder based on a BIN nr. This folder could be in a main folder that has diferent subfolder. As there where differnt naming used to create the folderes, one of the things they have always is the BIN nr. It alwasy start with a unique number and maybe I could use it to scan the subfolders and open that one that the BIN nr is equal as in the field BIN.
Now we have serveral 1000th of folders and finding them takes time.
View 3 Replies
View Related
Apr 27, 2015
I am trying to display an open file dialog window so that the user can pick up a file. I wish the window to show a specific folder. How can I do this? The code I am using is below. The parameter InitialFileName has no effect on the outcome.
Code:
Function GetFileName(strPath As String, imtype As String) As String
On Error GoTo Err_GetFileName
Dim Dlg As FileDialog
Dim sfl As FileDialogSelectedItems
Dim sflitem As Variant
Set Dlg = Application.FileDialog(msoFileDialogFilePicker)
[Code] .....
View 11 Replies
View Related
May 11, 2014
Code:
Function dialogFolderBrowse() As String
Dim fp As FileDialog
Dim vrtSelectedItem As Variant
Dim VarX As String
'this next line is an optional warning to the user so they know what is about to happen
'MsgBox "LOCATE THE DESIRED FOLDER!!", vbOKOnly
[code].....
THE UPPER code is to locate the user desired folder path and name in order to do further process. However, my problem is that no matter I press <OK> or <Cancel> option in the normal MS Folder dialog box, the process still going on. Is that I miss some on error or on exit code??My idea is that when user press <OK>, the process goes on and when press <Cancel>, no process will be done!!
View 3 Replies
View Related
May 28, 2007
hi guys,
i have 20 odd machines sharing the one access front end, however i find that i have to recompile the front end on some machines as the references dont match up. i'm assuming the office install is slightly different with the paths or something. there are just 3 machines that have this error but it is frustrating as i have to recompile and have 3 different copies of the one program.
is it possible to have all of my references stored on the server and they replace the current ones? i tried putting them in a folder and using the browse button but it only updated some references and not others. the obvious error i have with the 3 different ones is the trim function, it always throws an error where i use that.
thanks
View 1 Replies
View Related
Dec 12, 2014
I have a form which has a field called quote directory, this contains the path of the quote documents and sub folders, I also have a field called project directory.
When a quote is confirmed I have it all working so a new folder is created with specfic details like project number etc.What I want to do is move the folder from the quote directory and put it in the newly created folder in the project directory.
View 2 Replies
View Related
Oct 25, 2014
I'm trying to write a simple little database. At one point on a form, I'm trying to merge all the pdf files in a particular folder. (I'm using the pdftke.exe program and there will be multiple pdf files)
It all works perfectly if I call it as below, with the actual paths already hard coded. It combines all the pdf files and renames it to the "merged filename.pdf" correctly
Dim stAppName1 As String
stAppName1 = "C:a folder namepdftk.exe C:another folder nameprints*.pdf cat output C:folder where merged file will bemerged filename.pdf"
Call Shell(stAppName1, 1)
However, I'm trying to have it work with the middle portion (the folder where all the pdf files are) being created on the fly so to speak.
The middle portion/path I have stored from a previous form and it's stored in a table.
So I'm trying the below, but doesn't seem to work.
Dim stAppName1 As String
Dim combine_files As String
combine_files = (this pulls a path from a stored field on the open form) + "" + CStr("*.pdf")
stAppName1 = "C:a folder namepdftk.exe (combine_files) cat output C:folder where merged file will bemerged filename.pdf"
Call Shell(stAppName1, 1)
With the code above, it doesn't seem to do anything.
View 2 Replies
View Related
Aug 26, 2014
I believe this is most recurring scenario for all. Any simple way like:
Code:
For each file in folder.files
Msgbox File.Name
Next File
For your information the above code doesn't work
View 10 Replies
View Related
Oct 21, 2013
I added to my database a button to ouput the data to PDF. It works as it should. We do print out the letters in paper and put a copy in the folder from the client (connected with the ID nr). From time to time we need to attach a PDF document to the letter and combine it. My question is now if it is possible to have some code to the button that when it finish the output to PDF it will combine all the PDF files that are in the folder and put it in a second folder. After that, I need to put the combined PDF in another folder.
View 6 Replies
View Related
Apr 16, 2012
I have created a database that saves a link of technical data. Now i have forms where you can add the hyperlink of the data in the database. You can also type information about the data into the form (like location, what kind of part etcc.)But I was asked to save the data in a specific folder that you can select.
So what I have to do is:
Browse for a file in a form.Save the hyperlink of the file in the database.Don't save the file in the database, but copy the file that's selected when browsing to specified folder
View 12 Replies
View Related
Jun 11, 2006
Hi all
How can I change the output string in the command below to simply save the document to the same folder that the DB resides??
DoCmd.OutputTo acQuery, "qryAwardsExportWord", "RichTextFormat(*.rtf)", "C:dataawards.doc", True, "", 0
any help is appreciated
View 2 Replies
View Related
Aug 20, 2013
I have a folder that .csv files which are connected to my database are updating in. Once the .csv that i specify updates I want a color box to turn green. Is there a way to do this? Maybe just use when the linked text file updates?
View 2 Replies
View Related
Feb 11, 2015
I'm Trying to move PDF Files associated with a customer to there specific folder
The query gathers the data, Gives me a list of files by account number
Now I want to use the results of the query to move those files
View 5 Replies
View Related
May 25, 2015
I need a way to delete a folder along with subfolders and files associated with a record via command on a form:
The path is stored in a text field "txtDocuments".
For example: "C:UsersWatsonDesktopFY1515051505-010"
So, I would want the code to pull the folder location from the txtDocuments text field and delete folder "1505-010" and all sub folders & files contained within it.
View 4 Replies
View Related
Jan 20, 2007
I've searched the forums for days and I can't find exactly what I need to know, even though this is a very common topic, so if it's already been answered, I apologize.
My problem is simple. I have a database that tracks clients for me. I have a front end and back end in the same folder. Under normal circumstances, the static links that Access uses are fine. I just link from the front end to the back end and all is well.
But some other users of the database will need to track multiple people's clients. So instead of putting the database in c:database, I may need to have a copy in c:database, c:database2, c:database3, etc.
So what I need is a (hopefully) simple way to get Access to look for the backend in the current directory, no matter what that directory might be. It may be on a network drive, or the c: drive, or any of a dozen various subdirectories. And the users who will be using the database may be very computer illiterate, so I don't want to have any user intervention required.
And so that I'm not any more confused than I already am by any code you might offer up, the name of the database frontend is tracking.mdb and the backend is tracking_be.mdb
Any ideas? Thanks in advance. You'll make my week if you can figure this out with me.
View 11 Replies
View Related
Oct 9, 2014
I am trying to define a path to identify a current folder - I'll try and explain the way the following code works first (and it does work 100%)
The following code identifies folders and sub-folder structures and imports them (their structures and folder paths and filenames) into a DB
It also simultaneously retrieve's any xml docs within those respective folders and imports the XML data into the same database ........ and then moves those folders into a "processing folder" location.
Cool yes, but I can only import the XML doc's at the moment, by hard coding the path (like this):-
path = "C:UsersjeremybDesktopsnapmadXYZ123XYZFILES 0061940"
The code is highlighted as above - in the FULL code below:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Code Begins:-
Option Compare Database
Option Explicit
[Code]....
View 2 Replies
View Related
Mar 28, 2014
I've been trying to search for all picture files in my documents and copy them to a folder on the desktop. I found this and it work great for searching however I'm having trouble getting the copy to work. [URL] ....
Code:
Dim colFiles As New Collection
RecursiveDir colFiles, "C:Photos", "*.jpg", True
Dim vFile As Variant
For Each vFile In colFiles
Debug.Print vFile
Next vFile
Code:
I replaced the debug.print vfile with my copy function. I've tried copyfile but it needs to specify the destination with the file name. I tried using the FSO filecopy method and can't get it to work (keep getting a compile error "Expected =") I feel the hard part is done and this part should be simple.
View 3 Replies
View Related
May 16, 2014
I have a code to add links to files into a field, I recently migrated from Windows 7 to 8 and the name of the folders in 8 are different; therefore the database I have does not find the linked file anylonger.
To avoid this happening in future, I would like to have the option for the user to set the folder path through maybe a table and then the link will refer to the settings in the table.
Currently I am using the following code:
Private Sub AddLinkDoc_Click()
Dim strFilter As String
Dim strInputFileName As String
Dim varDirectory As String
varDirectory = "C:UsersMarco TagliaferriDocumentsBA CityflyerCrew SchedulerDocumentationDocs"
[Code] ......
View 2 Replies
View Related
Aug 31, 2014
I have an access program and i want it to save a copy into a location... ive got it so it can save however - i want it to save to the current users documents folder (win 7)
What file path would i use?
View 5 Replies
View Related
Jan 3, 2007
Please forgive my Newbieness and accept I am a keen ametuer running a small business and trying to use access as a tool. No doubt I will be back with many questions as you all seem so knowledgeable, thanks in advance.
Can't really do code but get on OK with built in wizards etc. Wonder if someone might be able to help with this one:
Is it possible to set a command into a form that opens up a windows folder elsewhere on the computer or network? For example, receive email from DIY multiple containing kitchen plan, installation costing etc, as attachments. File attachments in folder on server, manually enter detail into access database which generates "Customer ID Number", decides which fitter, surveyor etc. then need to email a report (have managed conversion to PDF and to launch outlook) but then wanted to copy and attach the original attachments to this new email, along with Access report for forwarding to various surveyors / fitters around the UK. Thus require if poss to open file on server, copy attachments and paste in new e mail, thought it would save time to do by one button press to open server file??
May seem easier to just forward original e mail but unfortunately some of the info in the mails from the DIY multiples is not for distribution and filtering isn't possible.
Perhaps one simply can't do it but worth asking, thanks again. Paul
View 3 Replies
View Related
Aug 14, 2013
Open a specific Windows Folder.I am using this code to open a specific Windows folder ..... and it works perfect:
As String Dim folder
folder = "c: Documents WORD"
Dim Retval
Retval = Shell ("explorer.exe / e, / root," "" & folder & "" "", 1)
... but also need to open in the specified path, taking the data "UserName" of one field in a table:
TABLE: "Assignments" IDEExp, UserName, Date
So instead of going to the folder = "c:Documents WORD" would go to: c: Documents WORDUserName ". In Windows and subfolders are created with UserName1, 2,3,4, etc.
View 10 Replies
View Related
Nov 26, 2014
I have 3 attachment boxes in my table that appears in a form.each attachment box contains specific files (not specific as in extension such as PDF, JPEG, etc.) but specific as in Company Documents, Certifications, Resumes. The issue is there's a lot of document and I see my database growing (fast)...My question finally is....
Can I use a Hyperlink to open a folder within a specific directory where multiple file are located so i can open the specific file need there RATHER than attaching them in the attachment box individually?.?.....If not how this can be done (no SQL) unless that route is very simple and basic coding.
My thinking would be to place the file path to the documents in the table and hyper link that column in the table, but not knowing exactly how Hyperlinks work I don't think it would actually work..
View 6 Replies
View Related
Dec 18, 2014
I have a tree-view object that is filled with a specific folder list, when a command button is pressed I would like too expand to a specific node based on a variable/foldername.
How to achieve this? My knowledge of tree-view is limited and I am still learning VBA.
View 2 Replies
View Related
Sep 18, 2012
My situation is that the access form field name is "Number" , there is a folder named "member" in
desktop C:UsersTomDesktop
For example If i press the command button (Field name "Number" is 123) in form , then automatic open named "123" folder inside named "member" folder
What is the Command button Code ?
View 4 Replies
View Related
Feb 19, 2015
I am simply trying to create a command button to open a folder on my desktop
Cannot seem to find this code
This is the path to the folder I want to open
C:UsersJONATHANDesktopCMS FILES
View 4 Replies
View Related
Sep 8, 2014
I am 2 years into my database. I am trying to find and open a folder based on a text box. The problem is folder could be in many sub folders which is hold on our J: drive.
To further complicate, the folder i am searching may not be exactly as the text box states.
EG. Text box could say 123456 however the folder could be called M123456 etc.
How do i locate a folder or subfolder and open it based on part of a text box...
View 3 Replies
View Related