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 Replies


ADVERTISEMENT

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

Possible To Move All References To A Folder On Server?

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

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 :: Attachment Locking The Entire Database

Jun 13, 2013

I have access BD and every one use it through shared folder. My problem is in attachment ! , if i use the regular attachment filed in access there is one user only able to attach files and others can`t attach any thing until he finish.

I tried to do attachment through VBA like below which make it worse as it lock the DB so, no one can even open the DB and one user only access the DB .

Dim db As DAO.Database
Dim rsParent As DAO.Recordset2
Dim rsChild As DAO.Recordset2
Set db = CurrentDb
Set rsParent = me.Recordset

[Code] .....

How multi users attach files at the same time without locking the DB.....

View 3 Replies View Related

Modules & VBA :: Setting Control Source For Entire Form?

Oct 21, 2013

Is there a way to set the control source for an entire form through VBA? I have a database that was set up just as an archive file, not intending to have any forms or reports in it. It was simply to house tables containing data from previous years. My main database just copies the table over to the archive file and adds the year to the table name. I have just been told that the users would like a form and a series of reports set up in this database.

I would like to set the main form up so that before it will allow them to do anything, they have to enter the year of the data they are looking for. After the year has been entered, I would like to adjust the control source of the form to reflect the appropriate table. In other words, when a user opens the archived database, he or she will see a field for the year an nothing else. Once they enter the year they are looking for, the form will populate with data from the corresponding table (the table names look like this - tblPM_Completed_2013). Is this possible?

View 6 Replies View Related

Modules & VBA :: Highlight Entire Record In Subform As List Box?

Aug 31, 2013

I would like continuous subform as a list box in my file. Now when click fields on my form the entire record will not be highlighted. In the sample I have found from the net when click on each field in the form entire row will be highlighted. So I try to using function in the sample for my own but it does not work and when I click on each field just that field in 1 second will be highlighted and entire row will not be highlighted.

Private Sub P_ForceHighLight()
On Error Resume Next
Dim ct As Control, ct1 As Control
DoCmd.Echo False Set ct1 = ActiveControl
For Each ct In Me.Detail.Controls ct.SetFocus

[Code] ....

View 1 Replies View Related

Modules & VBA :: Database Project - Update Entire Column Of Subform

Oct 31, 2013

I am working on a database project where I will Select a record on a subform

See the picture attached.

I know that using DAO recordset, i can update the checkbox one by one, but it become way too long when I have thousands of record...

May I know if there is a way to Select entire column of the subform?

View 1 Replies View Related

Modules & VBA :: DLookup With Multiple Values - Loop To Check Entire Table

Jul 14, 2015

I have run into an issue with a basic DLookup. The database has grown in size and now we could have multiple entries, but I want it to return a certain one. So the information could be in it three times. Of course DLookup stops after the first one. How do I get it to loop to check the entire table? Someone mentioned to me to use a recordset, but how to write that as I have never used it before. Below is what I was using until this new request came up.

<code>
Private Sub txtloan1_AfterUpdate()
If IsNull(DLookup("[loan1]", _
"settlement", _
"[loan1]=""" & Me.txtloan1.Text & """ AND [status] = 'Open'")) = False Then
Cancel = True
MsgBox "Test", vbOKOnly, "Warning"
End If
End Sub
</code>

This was also executing after the user entered the information within a text field. I did not want them to enter all the data and then have it come back as a duplicate.

View 7 Replies View Related

Modules & VBA :: Store Entire Query (single Field) In Array And Check Its Values

Mar 12, 2014

Basically, what's the best practice or how do we store a query's value into an array then checking what the max or min value is and how to check if let's say "4" is in the array?

View 1 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 :: 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

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

Modules & VBA :: Define Current Sub Folder Within Code?

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

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 :: Check Directory For A Folder Name Which Has Certain String In It

Jul 25, 2013

I'm trying to check a directory for a folder name which has a certain string in it (RecNum)

However the fso object filesys.FolderExists does not take an argument when looking for part of a folder name on a particular path.

What I basically want to do is look in a directory for a folder with the RecNum variable as part of the folder name. if it exists open it, if not create it.

This is how far i've got:-

targetdir = targetpath & RecNum & ChannelPartner & Enduser

Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists(targetdir) Then GoTo function_end
MkDir targetdir
If filesys.FolderExists(copypath) Then
filesys.CopyFolder copypath, targetdir
End If
MsgBox ("folder created")
function_end:

Shell "Explorer.exe /n,/e," & targetdir, vbNormalFocus

View 6 Replies View Related

Modules & VBA :: Using Date Field To Create Folder Name

Feb 27, 2015

Is there a way to use a field with date in it to create a folder?

the field has a data like this 15/05/2014 in it and the / will not work in folder creation. So I was wondering how to get around it.

Code:
MkDir "c:TestAccess" & Me.Date_In & "/"

View 3 Replies View Related

Modules & VBA :: Determine If File Exists In Sub Folder

Dec 15, 2014

How to search for a file using the dir function, however, i need to search for a file from a main folder which may have several sub folders.

I am having no luck so far - i understand there is a recursive search facility but im not sure how i can get this to work with what i am trying to achieve.

This is the code i have for the dir function:

If Len(Dir("as-tamworth-50midlands.qa$TamworthLaminate C of CsCircuit Foil" & CofC & ".")) = 0 Then
MsgBox "This file does not exist"
Else
MsgBox "Yippee"
End If

View 5 Replies View Related

Modules & VBA :: How To Take Screenshot And Save In A Specific Folder

Jul 25, 2014

how using vba i can take a screenshot of my screen and save the pdf or whatever form its in into a specific folder path.

View 1 Replies View Related







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