This code below works, but alot of what it does is unnecessary. I have a directory structure named 1000-2000, 2001-3000, 3001 - 4000 etc and within that is the individual folders 1000, 1001, 1002 etc
How do I test to search top level folder thats no larger than correctNum to then test the subfolder for correctNum? I've looked at instr and a few other funtions, but can't find a solution. Below is what I have now, it works but I know it searches everything and that's not correct
Dim filesys
Dim Subdir
Dim folder
Set filesys = CreateObject("Scripting.FileSystemObject")
Dim oDir
Dim bDir
CorrectNum = Serial.Value
I actually have about 13 separate fields in a table I'm trying to summarize in a single report field. Each field corresponds to a particular action taken. If the action was taken the field value is 1, if the action was NOT taken the field value is 0. The report needs to contain a single field that lists all actions taken. I tried doing this with an If statement formula on the report, but it does not work.
=(IIf([ACTION_VQ_SCAN]=1,"VQ Scan")) And (IIf([ACTION_OTHER]=1,[ACTION_OTHER_SPEC])) And (IIf([ACTION_CULTURE]=1,"Culture(s)")) And (IIf([ACTION_DRUG_THERAPY]=1,"Drug Theraphy"))........ and so on
It looks like it expects all if statements to be true, thus the formula does not return anything. Usually only 1 or 2 actions are actually taken, but I need to account for the possibility of any and all combination of actions.
I'm starting to automatically save PDF copies of certain reports in predetermined locations. I need to copy a file to a particular directory (based upon various criteria), but if the directory does not exist, I want to create the directory on the fly first. Otherwise I will just proceed with the copy.
I'm sure there is a DOS command to do this, but I can't find it.
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'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.
Code to automatically backup backend to any folder or media in Access 2010?I need codes to be backing up my Back-End automatically. I am using Access 2010 format.
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.
Simple vba code that allows me to import all the content in a specific folder into an Access attachments field? I have search but all I am seeing is code to import outlook attachments.
I am facing a issue in accessing my db file in server. I just splitted my database into front end and back end , placed in a local folder which is shared in network . I opened the files in network from my colleague machine and everything was working fine yesterday .. but right now i am getting error like "the network path is not found " 0X80070035 which tells that check whether the source machines is able to accept file sharing ..I googled and tried 2 solutions Like turning off windows firewall and enabling NetBIOS Over TCP/IP..
I have a specific access database that my customer have sent to me and it only works in a specific folder. I want to make it analyzed and worked in other folders but when I click, it turns out with a warning box that I should work with it in that folder.
My manager wants to be able to implement a kind of punch card system for managing staff time. I'm thinking we could make a database that links to a folder in Outlook. Staff will be able to send an email to the inbox saying that they are, for example, going on a break at 10:50, and then another at 11:05 saying they have returned and are back to work.
This would probably add up to around 500 emails per day with the number of staff we have, so I don't want to have to keep all the emails to be able to add up break times etc.
I'll be extracting the timestamps, name, break description etc from the email and storing them in another table. What I would like to know is whether Access would then be able to delete the email from the inbox (or modify it in some way to reflect it has been accounted for), or whether this would have to be a manual task?
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.
We have a server that we use to run a Microsoft Access application. This application creates folders, subfolders and files on the server.Users are in 4 different offices. Each office has at least 3 computers. Some users also work from home.
Users creates file through word, or scanning a document or by saving an email on their local pc.My problem is that users need to be able to save a file to a specific folder on server.
Many years ago I created a database that has one embedded image for each project.
I am now redoing this db in 2010 format and I want to extract these images and save them in a folder so I can link them to the new db based on the project ID number
The table is [Project main], the unique project ID is [R&D ID#] and the image file is stored in [Item image] as an OLE object. i would like to save them to C:db images
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)
If I have an MS Access frontend that connects to an MS Access backend, is there a way to hide/permission block the pathway to the backend's folder but still allow access via the frontend db?
Right now I can't dedicate a server to a more "secure" form of DB or anything like that so I'm stuck with MS Access for now. I just don't want someone looking at, say, a link table path and then navigating to that folder and getting access to backend information.
I have a database that pulls images from a shared folder on our network with links. Is it possible to create a button to email the current record on a form and attach the file it references in the link?
The attachment is a pdf signature. I didn't want to include the files in the database for space issues.
I am using Access 2007. We out outlook as our email client.
Hello peeps, I have been working on a hours checking application, in which the user can enter their worked hours for the week and the application calculates how many hours at normal rate , time and half rate or double time rate have been worked for the week. All has been going swimmingly, with some help from here of course :)
What I would like to achieve now however, is, testing for a Sunday. This is because all hours worked on a Sunday, is paid at double time, regardless of the previous hours already worked for that week.
Example if a person worked 60 hours in a given week, there would be 47.5 hours of normal rate, 7.5 hours of time and a half rate and the remaining 5 hours would be at double time rate. But, if a person worked 60 hours in a week and 10 of those hours are worked on a Sunday, this would mean 47.5 at normal rate, only 2.5 hours at time and half rate and the remaining 10 hours at double time.
Therefore, is there a way I can test for a Sunday and perhaps automatically set a flag for the overtime calculation? Or is it possible with DateDiff() function, and if so could someone please assist me with the syntax or at least point me in a direction where I could solve this?
All replies gratefully recieved. Thanks in advance to anyone taking the time to read this post.
I hope someone can help me. Thanks ahead for taking the time to read through my post.
I am new to Access (I know the basics,) and will ask my question by hand of describing what I want to do with my database.
I work as a laboratory technician, where I need to test UTP cores (cores are what's called one of the 8 cables inside a UTP/Network cable.) I want to create a database where I can store these test results.
To make it easier to envision my database, I'll explain a bit about the actual testing. Cores are grouped together, and tested, according to batches. There are 40 cores in a batch. Each core has a unique job number. Further, the cores are divided into 8 different colors (Green, W/Green, Orange, W/Orange, Brown, W/Brown, Blue, W/Blue.)
A standard test procedure is done on EACH core: dimensions on the insulation on a X and Y axis; dimensions on the copper on a X and Y axis; a test to determine if the copper sits centre. There are thus 5 values I want to record.
My problem is: I want all 40 cores, each with their 5 values, on one form. I want to save this as one batch, or one record. How would I go about doing this? . It’s a bit more complex than your standard table-query-form-report database.
As I said, I am acquainted with the basics of Access. I can do tables, queries, forms and reports.
I have a table where some of the values of MyField are null.
I am creating a function that depends on the value of Myfield which I pass to a variable varMyField and am testing it with If IsNull(varMyVariable) but it errors. Have tried setting the variable as a variant but no difference.
Function Test(varMyField as variant)
If isnull(varMyField) then Dosomething, Else Dosomething Else End if