Modules & VBA :: How To Access A Folder On Desktop

Feb 7, 2014

I used to have a code that we used to copy data from a folder that was on the desktop using the code below.

Code:
DoCmd.CopyObject "C:Documents and SettingsAll UsersDesktopWetcleans

This does not work with windows7. I have tried the C:USERSPUBLICDESSKTOPWetcleans but that does not seem to work either. How to access a folder on the desktop ?

View Replies


ADVERTISEMENT

Modules & VBA :: Search For All Picture Files In Documents And Copy To A Folder On Desktop

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

Forms :: Unable To Create Command Button To Open Folder On Desktop

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

Modules & VBA :: Open Folder Nested Inside Main Folder?

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

Modules & VBA :: Locate A Specific Folder In Access

Sep 4, 2013

In order to act as a system, I would like to have a function or windows firstly displayed all the folder names in a drive, and then allow user to locate/select freely a folder among different folders. Is there anything for my reference or for me to start??

View 4 Replies View Related

Modules & VBA :: Automate Scanning From Access To Specific Folder On Server

May 16, 2014

I have some code set up to automate scanning from access to a specific folder on the server. I have searched the web for different codes and have not come across anything that will scan an unknown amount of documents. The best I found was the code I am currently using, that will scan up to 10 documents separately, then convert these documents into 1 PDF. This is not ideal, however, because it would require the user to scan 1 document, wait, than scan another, wait, etc. Also, the code I am currently using will only scan from the glass, not the auto feeder, and I am unsure how to change this.

Private Sub cmdCOC_Click()
'scan COC
On Error GoTo Err_Handler
Const DEVNAME As String = "Brother MFC-7860DW LAN"
Dim ComDialog As WIA.CommonDialog

[Code] .....

View 1 Replies View Related

Modules & VBA :: Access 2013 - Make Copy Of PDF Document In Specified Folder?

Apr 25, 2014

I need to make a copy of a pdf document that the user identifies in a "hidden" folder that is associated with my backend database. how to code this. I am using Access 2013.

View 6 Replies View Related

Modules & VBA :: Allow ACCDE To Be Open On Desktop Only

Aug 4, 2015

In my frontend code, I include a table with a version #. In my backend, I also include a version table. The front end will compare wih back end, and if it's different, it will force to get the updated version that it's stored in the LAN.

However, I do not want the user to open the file directly from the LAN because it might cause slow performance problem if multi-user,etc.

So I want to implement a code to force the application to be open only from desktop.

So far, I have a strUsername which detect the user network environ. Then, it will check the application path to determine if it was opened from:

C:Users<strUsername>Desktop

If not, then an error message will prompt to alert the member to copy the file in the LAN and save on their desktop.

It works on my laptop, all fine. Today I didnthe test in my user desktop, but the message saying that the file has to be opened from desktop keep appearing.

I double check the user folder and the Username environ is (cd98) but the user folder was setup as "CD98" capital letter. Does that affect the coding?

How can I make my code to not distinguish between lower or upper case either for username and folder user as well?

View 4 Replies View Related

General :: Access 2010 And Access 2003 On Same Desktop?

Mar 5, 2013

is there a way to have both Access 2010 and 2003 exist peacefully on the same desktop. My company uses Office 2010, but my department has an Access 2003 application. As a result, I have to have A2003 on my desktop and use it quite frequently for this one application.

I have some small databases that I really want to move onto A2010 so we can take advantage of SharePoint functions, etc. Is there anytning I can do to be sure that the .mdb and .mde open in A2003 and the new .accdb opens in A2010, without getting errors and the Windows installer going through the Office installation process for the respective version? I've gone to the file locations and set the "Open with" setting to the respective version.

View 4 Replies View Related

Changing A Desktop Database To A Access Project

Dec 17, 2007

I built a database application, and I need for more than just myself to use it at the same time. I have just learned that I should have built a project instead. Can I change my application "Maintenance.mdb" to a project or do I have to start over?

View 5 Replies View Related

Zipping File Of Desktop With MS Access 2007?

Feb 24, 2014

I want to zip my file of my Desktop with MS Access 2007.

View 5 Replies View Related

Modules & VBA :: Save Access Report As PDF And Save To Folder

Jan 10, 2014

I have a few selected reports on an Access 2007 database that users can run. Is there a way for users to view the report, save as a PDF and automatically save a copy to a shared drive by modules/vba coding as an On Click event procedure?

View 4 Replies View Related

General :: Convert Web Access File To A Desktop Application?

Oct 21, 2013

How can I convert a web Access file to desktop aplication? I've created it from a model from Office.com, but I need create code in vba and it don't permit.

The use of file is only in desktop.

View 3 Replies View Related

Queries :: Converted Desktop Access Database To SQL Server

Dec 5, 2014

I have converted desktop Access database to SQL server. A medium sized app with 24 tables, 60 or so forms/subforms and about 120 queries. I created 2 split files, one containing the tables, and the other containing forms, queries, vba modules. I migrated the tables to SQL server using SSMA, and built an odbc connection for my front end. It works, except it is painfully slow. Its cos most of the recordsets that drive my front end are query based. And in many instances the queries are comprised of queries, not just tables.

Should i be creating my queries on the SQL server? Is that what people do when using Access front end with SQL server back end? Do away with Access queries? Or does the problem lie elsewhere? How do i network optimise my Access FE / SQL server BE?

View 10 Replies View Related

Is There Any Method To Synchronize Two Access File Which In Desktop And Network Drive

Aug 14, 2007

Here are some background . My company got a access file in a network drive.The data entry simply open the file in the network drive.But once the data has increased (~400mb) sudddendly,all process slow down. Like search , using report etc.Is there any method to imporive the situation?Some guys suggest me to copy the data file to the desktop and sync them.Can it it work?IF works,how to do that?

thanks gratefully for any ans

View 3 Replies View Related

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 10 Replies View Related

Modules & VBA :: Up One Folder In FilePath

Jan 24, 2014

FilePath = CurrentProject.path

I am currently using this path, but I moved my database folder into another folder so people won't mess with it. I still need to create files to the original directory. How can I make the FilePath still relative but up one folder from CurrentProject.path?

View 5 Replies View Related

Modules & VBA :: Merging All PDF Files In Particular Folder

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

Modules & VBA :: Loop Through All Files In Folder?

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

Modules & VBA :: Copy File From One Folder To Another

Feb 28, 2014

I need to create a function that I can launch using a macro that will copy an excel file from one folder to another in the file system.

View 4 Replies View Related

Modules & VBA :: Move Entire Folder

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

Modules & VBA :: Combine PDF Files In A Folder

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

Modules & VBA :: Create A Folder For Every New Record

Jun 22, 2013

I want Access to create a folder for every new record that is added to the database, and the folder name has to be a value of that record.

To make it clear: [URL] ....

The foldername has to be "123456789" for the first record.

View 7 Replies View Related

Modules & VBA :: How To Check Empty Folder

Jun 12, 2013

I use code to check folder as below.

If the folder not exists, then create it.

If dir(myfolder) = "" then
mkdir(myfolder)
end if

How to add code to check empty folder, like below?

If dir(myfolder) = "" then
mkdir(myfolder)

else if empty(myfolder) then //there is no empty function in access
do something
end if

View 2 Replies View Related

Modules & VBA :: Create Folder And Sub Folders?

Jan 30, 2015

I have the below code to create email and folders based on data from the database. For now, I'm able to create the main folder and add a word document inside. What could be changed on the code or added to add 2 sub folder named "Documents" and "Correspondence"

Greetings.

Code:
Option Compare Database
Private Sub SendEmail_Click()
On Error GoTo Err_open_word_Click

[Code].....

View 6 Replies View Related

Modules & VBA :: Hyperlink To Folder In A Form

Sep 26, 2013

I put in contracts in a form in Access.

Each contract has a Special ID. it's called mietvertragsnummerID (German Word).

Now i want by pressing a button, that for the choosen ID, a pdf, which gets saved in a seperate Folder, gets opened.

So i have the ID 18. (in the form in Access)

In the Folder M:FBGrimmSuW was saved the contract with the Name:

Mietvertrag18.

I've created the following code, but it doesn't work.

Code:
Private Sub Befehl4065_Click()
Dim sPath As String
sPath = "M:FBGrimmSuW" & "Mietvertrag" & Me.MietvertragsnummerID & ".pdf"
End Sub

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved