Modules & VBA :: Adding Button With Special Functionality - File Location In Database Path
May 28, 2014
In the access form I want to add a button with a special functionality.
After clicking "Select file" button special window should be open (or something else). It should give user a possibility of files locating (doc, pdf, rtf, txt ...).
After selecting the file and confirm the choice in the table "File_location" in database path to the file should be saved .
View Replies
ADVERTISEMENT
Aug 10, 2014
I am trying to code a button to select a file path.I get a compile error: User-defined type not defined on the following line;
Code:
Dim fldg As FileDialog
View 7 Replies
View Related
Oct 22, 2013
I have been searching all over on how to create an import button on a form in access 2010 where I can set which table it should copy the data into but the user could locate the import file.
NOTE: the reason being I have locked all the ribbons...
If necessary I could make a specific import template file which would have all the headings locked...
View 4 Replies
View Related
Sep 26, 2013
I have a field named Location of type Hyperlink. I have copied the respective filepaths in those location column.The location filed looks like
M:New1234.pdf
M:New1111.pdf
M:New2222pdf
M:New4444pdf
If the user clicks on this link then the respective file should be open..I don't want the front end users to see the entire path. So, I would like to have the names as 1234.pdf in the location column instead of M:New1234.pdf. Is it possible to hide the entire path in the backend and show only the name of the file. so that if users click on 1234.pdf then the file needs to open.
View 3 Replies
View Related
Jan 10, 2013
I am new to Microsoft access. I have a database moved from another computer. it is split into the backend and the front end..
However, when i click on the forms in the front end, I get an error message. It is trying to use a path from the old computer, to the database, but its on a different computer.
So, this brings me to my question, how do i change the path, to the new location
View 1 Replies
View Related
Feb 7, 2014
I am using this code
DoCmd.OutputTo acOutputReport, "rptFilter", "Excel97-Excel2003Workbook(*.xls)", strFilename, True, "", , acExportQualityScreen
With the OutputFile set to "" so the user can select the directory on where they want to store the exported template. I'm trying to figure out if I could get the file path and the file name and store it on a string so I could use it for something else.
View 4 Replies
View Related
Sep 29, 2014
In Access 2010 how to add a file path in the report footer?
View 4 Replies
View Related
Oct 15, 2014
I have to add 2 company logos and a phone graphic to a report.
I can only seem to add one logo and if i try to copy and paste a graphic it just displays the file path.
View 3 Replies
View Related
Jul 22, 2012
I have a field on a form which the user currently has to manually type in the file path to a specific picture on a local drive. After the file path is entered, the path is linked and the picture is shown in an image box. I did this because I didnt want to bog the database down with attached files.
I wondered if I could have a browse button, which when pressed brought up the browse window to allow you to locate the image (using the standard windows browser). Then when you clicked ok, it writes the filename into the correct field on the form.
View 1 Replies
View Related
Jan 11, 2015
I would like to create a form that allows me to search for a folder on my desk top, then once located i can transfer that file to a specific location on another drive, Similar to the Browse / upload function you see on many applications.I am using Access 2003. Is this possible??
View 5 Replies
View Related
Feb 20, 2014
I use the below code as part of a database which creates documents and then saves them using data from the form fields.
Every now and again one of the form fields contains a "special" character such as /,@,& and this prevents the file from saving.
Is there a simple addition to the below code to remove special characters from the file name if there is one present?
It causes all sorts of issues as many people don't realise that there has been a problem until it is too late.
Code:
objWord.ActiveDocument.SaveAs2 FileName:="C:UsersPublic" & Forms![Front Page]![Site 2 Name] _
& " " & Forms![Front Page]![Combo79] & " " & "O2" & ".doc"
objWord.ActiveDocument.Close
View 9 Replies
View Related
Oct 28, 2014
I'm having another one of those days but I'm getting a file path and file name from a dialogbox and forgotten when the VBA property is to return the full file path and file name.
This code works fine for return the filename only:
Code:
Private Sub TEST()
Dim f As Object
Set f = Application.FileDialog(3)
f.AllowMultiSelect = True
If f.Show Then
For I = 1 To f.SelectedItems.Count
MsgBox Filename(f.SelectedItems(I))
Next
End If
End Sub
Instead of using 'Filename' what else can I use to return what I need?
View 3 Replies
View Related
Mar 2, 2007
Hey guys,
How can I change the tables' splitted file path via vba?
Ex.: c: ables.mdb -> c:ew path ables.mdb
thank you.
View 3 Replies
View Related
Jun 14, 2006
Hi All,
I have been trying to figure this out for ages but I cant seem to get the code right or find any info on it.
In my database i have a mail merge on a button click which creates a new merged word document. I then need a way of when the user saves the document in word, bringing back the file path and putting it in a table called tblHistory with the correct customer ID in there too.
Any help appreciated
Thanks
Alex
View 1 Replies
View Related
Jan 29, 2015
I have some code that takes data from my database and creates an email with it. It also creates a folder and a word document. In the email, I would also like to include the file path as a link instead of just the path that it puts there now. Is this possible to do?
Code:
Option Compare Database
Private Sub SendEmail_Click()
On Error GoTo Err_open_word_Click
Dim oApp As Object
Dim path As String
[Code] .....
View 1 Replies
View Related
Mar 5, 2014
I'm importing a txt file using the following code.
Now my question is, how can I make visual basic ask me to select a file to get the path and put it in a string.
And use this string in the DoCmd.TransfetText
Code:
DoCmd.TransferText acImportDelim, "IN-specification", "tblimport", "C:usersKimdesktop extfile.txt"
View 1 Replies
View Related
Jan 12, 2015
Im trying to programmatically (without any user intervention) retrieve the long path name for a given file. It seems to me this should be a rather easy thing to achieve using Access VBA. Ive tried using various FileSystemObject methods with no luck. Ive Googled many variants of VBA get full path without any meaningful hits. provide the first string as a parameter to some object and have it magically return the second string.
String 1: C:PROGRA~2COMMON~1MICROS~1VBAVBA7VBE7.DLL
Stint 2: C:Program Files (x86)Common Filesmicrosoft sharedVBAVBA7
View 7 Replies
View Related
Feb 15, 2015
When creating an incoming inspection database, I want to set it up so when I am in a form to add data, I want to have a command button where I can pull up the associated CAD drawing based on part number and drawing number. I would like to enter the directory location into a table so I could change it if I need to.
So basically I want to go something like this:
.tblDirctoryLocation
txtDirectory
.tblProduct
txtProductName
txtProductNumber
txtProductCADNo
These tables would not be related to one another as there will only be one record for the directory location and multiple records for products.
Somehow I want the db to assemble file location like this:
“EQuality_DirectoryIncoming” & “ProductNumber_” & “CADDrawing” & “.pdf”
End result: EQuality_DirectoryIncomingProductNumber_CADDraw ing.pdf
Is there any way this could be done?
View 1 Replies
View Related
Apr 28, 2015
How easy it is to add a button to a form with a function to copy a zipped file to another location and unzip it?
View 10 Replies
View Related
Mar 3, 2015
I have created a database that tracks the locations of all the faxes we receive in a day. We have a dedicated employee that enters them into the database as well as who they are assigned to and other pertinent information. At the end of the day, I monitor the network folders where the faxes are saved to change the status of the fax in the database to done, still needs processing, or awaiting approval. Is there any way that I could set up some VBA that would automatically update the status column for the record based on the location of the file? The file name is recorded in the database so then if it sees that that file is in the end folder it could automatically update the status to finished.
The response I got on another forum is as follows:
-The impression I'm getting is that you've got a database of information over here.
-And it lists the file name, but not location.
-And then you have a physical folder structure with the fax files in it.
-And there are folders for done, awaiting approval, or processing.
-So what you're looking for is something to read those folders and update the status column based on which folder it is in?
-So at the start of the day we have:
New
-Fax1.tiff
-Fax2.tiff
-Fax3.tiff
-Fax4.tiff
Finished
-
In progress
-
And at the end of the day the folders look like this:
New
-Fax1.tiff
Finished
-Fax3.tiff
-Fax4.tiff
In progress
-Fax2.tiff
And you want your code to browse those folders, and update the status of each filename based on it's folder?If the filenames are unique, you can just use VBA to open the folder, create an array of the files and then set the status. Create two separate functions, one for in progress, one for completed and call them one after the other. There'd be no need to check the current status, but you could store the wrong status if a file is duplicated, or a filename repeated.
View 3 Replies
View Related
Jul 31, 2013
I've recently created a new Access 2010 Database which I'm developing an interface for in VBA. I've created a new Userform in the Visual Studio (this required me to add the Userform button). I'm finding that when I insert the Multipage object which I need to use on the form I can no longer run the Userform. When I attempt to run, I get the error 'Path/File Access Error' followed by 'Run time error 75 - Could not find the specified object'.
It's definitely linked to the Multipage which I've inserted from the toolbox (standard object) as the form runs fine when it is not there and with other objects (have tested all other toolbox items). There is currently no code in written in the project, no tables or queries set up in the database therefore nothing is running when the form loads.
I've successfully used Multipages in a number of other VBA interfaces both in Access and Excel so not sure why they are causing a problem here. I've also just created a userform in exactly the same way in a new Excel sheet and it runs fine with the multipage.
View 1 Replies
View Related
Nov 19, 2013
I am using MS Access 2010. I have a code that I am using that loops through a folder gather all the names of the files in the folder and inserts them into a table (shown below). The table is named "tblFiles" there are two columns in the table titled file name and file path. What I want to do is to also loop through the same folder to find the file path of the files and insert them into the file path column has a hyperlink where users can just click on the hyperlink and the file opens.
Private Sub Form_Load()
Dim fs, f, f1, fc, s
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblFiles")
[Code] .....
View 4 Replies
View Related
Jun 18, 2015
I want to find a way to grab the text from the window that shows the location of the file using vba in Access.
View 3 Replies
View Related
Jan 20, 2015
I want to create a button on my form that when pressed will scan my multi page document (ADF) from my Epson WF-3540 and save it as a specified file name and folder.
View 5 Replies
View Related
Jan 28, 2015
I'm currently working on a database to track and inventory documents in my organization similar to a library catalog, but with a digital archive as well. I'll need the ability to "attach" documents to records in the main inventory (though using links instead of storing it in the db) and have the documents live in a centrally accessible location on our shared server.
I will need to have this function work through a few different tables and in a few different iterations, but I'm trying to work on the simplest part first, which is attaching a thumbnail/preview of a given document to the record for that document.
I've got some VBA working well which opens the file picker and copies the file to a directory relative to the DB. It also creates a folder with each employee's ID number if it doesn't exist already (which it gets from the Windows log in) and adds "Copied_" to the front of the file.
Now I'm trying to get the VBA code to interact with the record. Presumably I need to tell the form button I'm using to launch the VBA code to pass the primary key of the record being displayed to VBA. Then, at the end of the VBA code I need to take that value and find the record again from VBA so I can update the MediaThumbnailLink in the original record.
Does this order of operations make sense? If so, how should I go about passing these values back and forth and writing the new link value?
Here's the VBA I'm using so far...
Code:
Option Compare Database
Public Sub GoCopyThumbnail()
Dim fDialog As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim varFile As Variant
Dim LUser As String
[Code] ....
View 2 Replies
View Related
Jul 28, 2014
Just wanted to confirm which is the best way to create an automatic back up of a access DB. (Split DB, backing up the BE - Access2010)
Firstly I was thinking of just creating a batch file to copy the file to a new source directly with a task scheduler set up.
Ideally I'd like it to run daily and have the date of the back up added to the end of the filepath.
View 5 Replies
View Related