General :: Saving Program To Current User Documents Folder?
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)
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.
I have a folder with Access files, subfolders, and some .vbs files in it. It requires one person to navigate through a setup process. Once the setup is completed, they need to copy the folder and its contents to a location on a shared drive, which is unknown to me and will be chosen by the user at the site. There could be many sites.
It basically works like this:
Files are downloaded to C:Program Files.
A vbscript is run and extracts a folder directly to the C:Drive and opens it. I'll call it C:Test.
The user manually moves the BE file to a shared drive.
The user opens the FE file and is walked through using the Linked Table Manager.
The user then follows a series of forms to input data.
After this, the FE closes and another DB opens.
The second DB walks them through the Linked Table Manager and closes.
Option #1 At this point I would like to have a script and have it copy that folder, C:Test, and its contents, and have a dialog box open telling the user to paste it in a location where all users have access to.
Option #2 A script that will backup the folder and all its contents to a shared location selected by the user.
Either option will l allow others to navigate to that location, copy the folder, and paste the folder to their C: Drive.
I want to move documents associated with one customer from my main document folder to another. I've looked at some sample code but nothing seems to work
I have the code below and I want it to open a file from my documents folder. The only problem is that every computers path is different to this folder. Any easy way to work around and open a file in My Documents without the full path?
I want to eliminate the part of the path in red and make it universal because computers will have a different number.
Operating System: Windows 7
Code below:
Public Function AddITARPicOffloadAnalysis() Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") With xlApp Dim wb As Object Dim ws As Object Dim Lastrow As Long
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.
I have a database that creates many forms based on queries which are based on user-defined variables. These are permanent variables added directly in the query, such as "if an employee is late 4 times in a month, we yell at them." I would like to be able to change this to "5 times in a month" if the users want to.
Rather than waiting for that to happen and having to change all my queries, i want to set up a form for them to access and edit the variable, save it, and then my queries to reference that variable.
My question is what is the best way to store and reference them? I could create a table, but i am not too sure how easy it would be to make my queries work with that.
I could also add them onto my main form which is always open, but I'm not sure how to make them save when access is closed. (a quick trial from my variable form won't let me update either a text box or label value on the main form).
I have taken the Access Tasks template and modified a bit. It now captures and saves the time and date a record is modified. The database is on a network folder and is shared among our team users.What I would like to do next is make it,
1- capture and record on my Tasks table the user name of who created the record by using the fOSUserName() function. I have the table fields "Created by" and the VB code in a module. This would happen only once when the record is created.
I would also like to do this with the machine name for which I have the module too. fOSMachineName()
and,
2- capture and record the user name of who modified a record. For this I also have a field in my task table "Last Modified By" and i hope i can use the same fOSUerNmae() function.
I got to the point where I put an unbounded text box with the =fOSUserName() in it and it does show the user name but how do i get to record to my task table?how the template removes the tasks that are completed from the task list as soon as it is updated to completed? how can I make this happen with a cancelled option after I add it to the drop down list?
how i can get a current user from a custom login form CurrentUser() this function always return a system user name admin as default. In my login schema i have a Hidden splash form that have a unbound field that holds user name from custom login form after login a dashboard execute and also display user name on dashboard according to user login ,this working fine for mine. Actually i want to make a currentuser stamp in every entry when a record is entered in database.
How to write Sample Code to Retrieve the Current User Name?I have done for short name only and I need it full
Private Declare Function apiGetUserNameWindows Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function fOSUserName() As String Dim lngLen As Long, lngX As Long Dim strUserName As String
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.
What I really need is for when the form opens, it looks at todays date, then matches current user and then goes to that record for today, if no current user there, then will goto new record..
i know, sounds complicated, and probably is really easy, but my heads not with it today, as about to get drunk as its my 40th, and got people ringing and texting and still trying to get this done....
I've included a copy of this database, named Timecards..
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):-
Because of certain design considerations and the amount of data I'm maintaining, I have chosen to use tabbed documents rather than floating windows or subforms.
The hierarchy is supposed to be a person who is categorized as either a client, family member, donor, etc. Further, a client may use one or more services. In the example, our client uses Specialized Home Care. However, the tabs are intuitively out of order: the people tab is left-most, followed by the Specilaized Home Care tab, and lastly the Client tab. It should be People, People:Client, People:Client:Service. If a person uses a lot of our services, there will be separate People:Client:Service tabs and the People:Client tab will scroll off to the right. I'd like Access to order them properly but see no way to do it.when the forms are opened, it's people first followed by the high-level classification (i.e. Client), and the lastly the specific Client:Service tabs. I would expect Access to open and display them left to right, but, as you can see, it doesn't.
I have a button that when pressed it checks a specific file for documents with the same name (example: Test, Test 1, Test 180, ect...)
Code: Dim StrFile As String StrFile = Dir("C:UsersJohnDesktopTest*test*") Do While Len(StrFile) > 0 Debug.Print StrFile MsgBox StrFile StrFile = Dir Loop
The problem with this is if there are 2 files with Test (Test, Test - Copy) It gives me 2 separate message boxes. The first with Test. Then a second message box with the second file, Test - Copy. I want to combine both of the message boxes in to one. So the message box would look like:
I would like to Create a database for indexing / organizing PDF documents. My Company currently use a 3rd party accounts program and we raise sales and purchases using numerical numbers ( but we can Jump to a new range of numbers within the program) for example if the purchase order numbers become simliar to the sales order numbers. But this 3rd party software does not let us scan documents into it hence the need for an alternative database.
For the data base I was thinking if only creating a index of the sales order numbers to start with. the first few question I have are.
1.) Should I Use the Autonumber as my first index column or should I replace it with our own sales order numbers in that column.
2.) is there a way to autopopulate the sales order numbers in a table for historical sales numbers.
3.) can you scan directly into Access
How to start planning the design off the database as I know this is almost the most important aspect of a database.
Once a year we have a conference that has about 400 people attend. These people will participate in several classes, randomly, over a four day period. Each class hands out an evaluation form. This form has six categories and asks you to rate each from 1 to 5. This is done with a grid on the form labeled with 1 2 3 4 5 across the top and the attendees will put a checkmark or X in the appropriate box. This results in approximately 3000 evaluation sheets.
I will take these and manually enter the scores into a database I created in order to tally the results and generate reports. I have been asked to see if this process can be expedited by using a scanner to pull the scores from the sheets.
I have a report named Link_report which retrieve links to find some documents. I would like to add a Msgbox to say: " No link has been found for this document" when the case link is empty.
I'm trying to make a simple program to automate timesheet templates. Each of our staff members work on a 4 weekly basis (week 1, week 2, week 3 and week 4). I currently use a word document with the template in and copy and paste it into the timesheet. The timesheets run from the 23rd of one month until the 22nd of the month after. The issue is the four weekly template doesn't fit the same every month so I am after an automated process.
I'm thinking of having forms to select a staff member and change their hours on the template, if you will, and then a button to create new timesheets where admin staff would just need to add the first date (ie 23/09/2013) and the timesheet would be made for each staff member and auto filled with the four week template.
My main issue is I'm not sure how to link the dates to the weeks in a table. I have attached a word template of my own hours.
I have made a program that can identify a entry in a field (ID) and change the quantity of a field. However, if can only identify numbers. I have the code as follows:
Code: Option Compare Database
Sub AddToInventory() Dim tb As DAO.Recordset Dim I As Integer I = 1 Do Until I = 2 On Error GoTo Canceled
[code]...
The "where ID2 = " only works with numbers. Is there anyway I can make this work with Strings? Basically, Find the string in a column and update the quantity.
I have been reading a lot about Access Runtime and the problems that occur when a runtime application is installed on a machine that already has a full version of Access. Any program that can be used to create an .EXE type file for an access application that will eliminate all of these problems? The cost of the compiler program is not a major concern if it works!!!