Open A Directory From Access
Nov 30, 2005Hi, I wish to open a folder/directory (not a file) using the onclick event of a cmdButton. Any ideas out there?
Robb:D
Hi, I wish to open a folder/directory (not a file) using the onclick event of a cmdButton. Any ideas out there?
Robb:D
We decrypt about 130 different files into an internal directory by using code that was created in Access 2010. I would like to open that directory with the files that were decrypted for that day so the user can confirm that the process was completed. I use the Shell command throughout the code but I cannot figure out a way to open the directory.
View 1 Replies View RelatedI have some code that resides in a button on a report that allows me to save a PDF version of this report. My problem is that if i have the destination directory open on windows explorer, i get a runtime 2501 "The output To action was cancelled" error.Is there any way to check if the directory is already open, and cancel the output to, or close the window to avoid this error?
Here is my code:
Code:
Private Sub CmdSavePDF_Click()
Dim MyFileName As String
Dim MyPath As String
'Dim CompanyName As String
[code]...
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..
Hello creators,
I have a little problem and it is creating and checking directories.
In my database I have a form, on it you can see a record of a project. This project has a keyfield called projectno.
On this form there is a button to create a directory with the projectnumber. So far so good. (code example: MkDir ("C:projects444323")
My problem:
If the directory for some reason already exist the code stops and gives an error.
Now I want to create some code that checks if the directory already excist so than I can skip making the directory.
Thanks for the help!!!!!
I know the is probably wishful thinking, but is it possible, and if so how, to link or create groups from Active Directory for use in Access.
View 1 Replies View RelatedI want to link into the active directory to get a list of staff usernames, so it will update the user table as new members of staff are created etc. We currently have around 130 staff, so rather than manually updating the user table i want it to pick up the usernames from AD?
View 3 Replies View RelatedI have a database that, I would like to add a button that performs a active directory lookup. I would like it to check a username with Active Directory, and auto populate a few fields.
First Name
Last Name
Manager
Department
This is my first database and I have very little exp using VBA.
I am using Access to save an Excel file in a particular directory. The code was created about 10 years ago and hence saves the file with .xls extension and I would like to save with a .xlsm extension. If I just change the .xls to .xlsm, in the code below, the file is saved but the Compatibility Checker comes up (I would like to stop this) and when the file is reopened I get an error message stating there is a file extension problem and the file won't open.
Code:
strExt = ".xls"
'If .txtFriendlyName <> "" Then
' strDestFileName = .txtFriendlyName
'Else
' strDestFileName = Left(objFile.Name, Len(objFile.Name) - 4) & MakeFilePosfix(Now())
[Code] ....
how to restrict access to forms and reports using the Active Directory. It is a pretty simple method to pick up and easy to use in any database. My problem comes when I try to apply this same method to tables and queries as well.
View 5 Replies View RelatedI have made a form on access which will be used by other employees within the company, however they have never used access before and they are wanting to access only just the form as I feel with Access and all the tools in the background will confuse them, plus I don't want them editing the data base its self.
Is there a way to only bring up the form, unless I obviously need to edit the date base.
I've done some research on Google and it seems I need to use:
SW_SHOWMINNOACTIVE
However I can not seem to find how I would use this or where?
and also if i did find a way to only bring up the form, how would I be able to switch it from that veiw to the veiw I edit in?
Can I for instance while my db is open, open it in design mode from my form via code?
View 3 Replies View RelatedCan you use a VB6 directory listbox control on a MS Access form to display the directory structure? If so, how do you do it?
Or is there some other way to display a user selectable directory structure on an Access form?
Thanks
tw
Hi All,
I've been trying to use TreeView control to display my computer's directories and folders just like Windows Explorer does.
Thanks to Popeye for reposting all the Treeview samples (samples posted before the site was hacked). Most or all of these samples, TreeView is used to display data out of tables. Mr. Ghuson posted a great example for browsing directory but it pops up a separate windows for browsing.
Now I'd like to somehow combine the two into one; browsing thru directories and folders using TreeView Control. Yes that I can browse and save all paths and directories to different tables and add them to the TreeView control but I'm trying to stay away from saving data to tables first.
Can this be accomplished? Can Windows Explorer be somehow embeded on an Access form or called? Any ideas, experts out there?
Thanks all in advance.
Anyone got any ideas how to get the directory path where the database is running?
Thx in advance
Bob
I have made an Access database containing contract names and addresses. I need to have each of these contracts linked to another table which shows the allocated engineer for the particular contract. I used a "one 2 many" relationship using a field "LinkID" to do this. Each engineer has a unique "LinkID" in the engineer table but the engineer changes each day. The engineer for each particular day comes via an excel spreadsheet. The way it works at the moment is that the engineer name has to be manually changed each day, and this takes time. I have tried importing a linked excel table which looked like it would work, but was not able to use the linked table in the same "one 2 many" related table format as above.
What i need to do, is find a way for the fields containing the engineer name to be automatically updated somehow, possible by reading the values from the excel sheet.
Anybody know of any way for this to be done?
Thanks, and hope this makes sense got its got me baffled.
*** Edit **** Thinking about it, i could have an imported execl sheet which contains all of the engineers for each day. Would there be a way using a macro, to update the data in the engineers table that is related to the contracts, by overwriting it with the data from the linked spreadsheet?
Hi,
In MS Access,
DoCmd.OutputTo acOutputReport, "Appr", acFormatRTF, "P:Appr.rtf", False
I want output the file in the current directory,
the above code is specific the path,
how can I edit the current path, so whereever the the database is either drive, they still can work.
The concept is like that
DoCmd.OutputTo acOutputReport, "Appr", acFormatRTF, currentdirectory:"Appr.rtg", False
Please let me know, thanks.
Hello Access gurus
I hope I am in the right place to start this off
I had D/b all set up but i need to have on my form a view of directory(s)
I have button that creates the folder (many thanks to the person whom gave me this )
but what i want to be able to do is preview this witihn my form
so on my form I want a box that will show what i have stored in this folder (which could be word or pdf or xls)
my button will create C: empfiling filenumber & filename ( about 20 chars)
so my form need to be able to preview all files within this folder ( I hope that I have at least half way explained what I am after
Access 2000 - and reasonable expereince (not brillaint at advance VB )
any thoughts regards
I have a form where I want to browse for the directory path and display in a text box.I have done something similar to browse for file and display, but this time round I need only the directory path to be displayed .Need help on this.
View 1 Replies View RelatedIs there a way to make a directory box, like you can find invisual basic, that you can dynamically search folders for files?
Thanks
I'm hoping someone can help me with this.
I would like to be able to provide a directory search form in my database. This is to enable staff to locate files that they would like to attach to the report they are submitting.
I don't seam to be able to find a control to do this.
We have Access 2000
Any help sample code ect would be appreciated.
Thanks in advance
David
I already have this working by means of:
doCmd.RunCommand acCmdAppMinimize in Form_Load (or Form_Open) events.
This works great to hide Access and only display the main form (like a standalone app).
But I have 2 issues:
1. The PopUp form (main or "switchboard" if you like) opens, then Access is minimized, but then the form looses focus. If there are other programs running, form will be behind them!
2. Access is first seen opening (for a moment) and THEN minimized (see 1.). Is there a way NOT TO SEE IT at all? :)
Thanks!
Hi All
I have a small Help Desk db with tables that contain computer spec and user information. But I already have all this information in Active Directory and it seems pointless entering the information twice.
Is there any way i can get the database to lookup the information from Active directory i have no idea where to start.
Thanks
Hello, I have a VBScript that when clicked on opens the command prompt and fires code to upload a query to my website.
What I would like to do is place a command button on my form that will call the script to run instead of having to go and click on it.
I have searched, maybe using wrong terms, but havent been able to get the right code to do this
any help to call this script from a command button would be appreciated.
Hi,
Having recently correlated the impossible pile of photos that I have on CD, including a lot of re-naming etc... I have now managed to get them down onto DVD.
I there an easy way to import a directory listing into an access database other than inputing the lot by hand? I don't wan't to add thumbnails just the file name and the directory it's in. I can embelish other details later via ASP, just need the bulk of the work done easily.
I have some experience of database design but not huge amounts of programming, other than the ASP side of things so if anyone has a complex answer please go gently with me!!!
Al
hello all and thanks in advance
here it what im trying to do
i have a client form to input client info
i want to take the address field and create a directory on a specified drive when i click a add record button and store that path in the table so i can call up files that will be scanned later.
been looking all over need help
B