Populating Picture File Names From A Folder
Jan 13, 2006
I could realllllllly use some help here....
I have database that looks like this:
Type | Pic1 | Pic 2
-------------------------------------------
12-5525 C:RC125525-01 C:RC125525-02
12-3556 C:RC123556-01 C:RC123556-02
As you can see the picture naming system is standard and is based on the content in the type field. If one record of the Type field is say 12-6636 then the picture will be RC126636-01 (for Pic1) and RC126636-02.
Is there a way where the user say... can type C: and it will populate the picture file names in a combo box?
There are about 2000 records in the DB and I am just trying to find a way to keep a user from typing all that stuff.
:rolleyes: Could there be a way to do all 2000 records at once?...:rolleyes:
Thanks.
View Replies
ADVERTISEMENT
May 23, 2014
I have a form with a subform.In the footer of the subform I have a combobox that get the file names of excel spreadsheets from a folder.I have a button (no code on it yet) that I want to press and import that spreadsheet into the table for the subform and associate it with the main form.
View 11 Replies
View Related
Feb 8, 2014
I have below module to save picture under named folder:
Code:
Option Compare Database
Public Enum acFileType
acPicture = 1
acFiles = 2
End Enum
[Code] ....
But how to save the picture with customized name, say "Materials 0001.Jpg"
View 7 Replies
View Related
Jul 8, 2013
I have a MS access db with a report that displays a list of students with a pic of their face on the side.
The pics are linked to a folder thats inside the folder where the .accdb file is stored.
The accdb is often moved around, but when it does, all the links become broken and the images are no longer displayed on the list.
How can i adjust the link path so that regardless of where the accdb is moved, the links remain valid?
I am using ms2007 and also its not a networked area but rather a bunch of standalone computers.
View 14 Replies
View Related
Mar 28, 2014
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.
View 3 Replies
View Related
Oct 19, 2006
I'm using Access 2000. When I click the File menu to go to a recently used file, the entire path is shown. With my file system, the File drop down widow is about 50 characters too short to show the entire path all the way out to where I keep my database. Is there a way to shut off the viewing the entire path "feature?"
View 2 Replies
View Related
Jun 21, 2005
Hi I created an access with a picture I copied from the internet. When I run the report in Access, I can see the picture but when I export the report to a text file, the picture is lost. Is there anyway I can have the picture everytime I export the report to word format ?
View 3 Replies
View Related
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
Jan 12, 2006
Hi Di Hi
I am new to Microsoft Access and have a little problem. I have searched the forum and nearly found the fix but I didnt quite understand what to do, so im creating a new thread.
I have a Access Database and have a client page that stores all the information about that client. We produce reports (scanned word/pdf) for each client and we store the report files in a client folder using the Client ID taken from Access.
My question is can I somehow produce a link from the Client Form in Access to the Client Folder or Files in explorer. I have seen the Hyperlink option but that is only availabe in Design View.
Hope someone can help. Thanks in advance,.
View 11 Replies
View Related
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
Jun 26, 2014
I'm trying to write a function to unzip a file (working off Ron de Bruin's code here)..The function should take the path of the zipped file as an argument and return the path of the unzipped file (extracting to the same folder)
Code:
Public Function UnZipFile(strFile As String) As String
On Error GoTo ErrorHandler
Dim objFSO As Object
Dim objShellApp As Object
Dim strUnzipped As String
[code]...
But the code has no effect (i.e., I'm still left with just the zipped file in the folder, not the unzipped contents?) strFile is a legitimate path to an existing .zip file which contains a zipped .xls file
Code:
objShellApp.Namespace(.GetAbsolutePathName(strFile)).Items
...but found that the .Count property was 0?I've done several searches on how to unzip files using VBA and this seems to be the universally accepted method.
View 14 Replies
View Related
Jul 5, 2013
I am trying to set up a link to a file folder on the computer fore each individual, it is not going to the individual people, it is just going to the one person where I put the link to file.
View 5 Replies
View Related
Oct 21, 2013
I have a macro in access that will create a folder and create a word doc in the folder with the name of the folder. I would like to add to the same folder an excel file. The excel file is in a folder and needs to be copied every time in a new folder when created. where to add the excel file from the below folder:
C:Excel CopyCombine_PDF.xls
this is the macro:
Code:
Private Sub Command22_Click() 'this will register the letter and create folder, word doc and open all
Me.[DateRegistered] = Date
Me.[PersonRegister] = Environ("Username")
Me.Refresh
[code]....
View 2 Replies
View Related
Apr 27, 2015
I am trying to display an open file dialog window so that the user can pick up a file. I wish the window to show a specific folder. How can I do this? The code I am using is below. The parameter InitialFileName has no effect on the outcome.
Code:
Function GetFileName(strPath As String, imtype As String) As String
On Error GoTo Err_GetFileName
Dim Dlg As FileDialog
Dim sfl As FileDialogSelectedItems
Dim sflitem As Variant
Set Dlg = Application.FileDialog(msoFileDialogFilePicker)
[Code] .....
View 11 Replies
View Related
Feb 23, 2013
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.
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
May 27, 2014
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
[Code] .....
View 9 Replies
View Related
Oct 13, 2014
In VBA I have set a timer on a form to run a query and export to a specific folder as an excel file.
If I open the database as 'File Open' and open the form and let the timer run it exports perfectly.
As soon as I put the database into runtime - the Timer code kicks in and starts running but as soon as it hits the export line. It stops and then does nothing
I have tried several combinations of either:
- docmd.runsavedimportexport "Query"
- docmd.outputTo acquery etc ...
View 3 Replies
View Related
Sep 5, 2014
I have a table with an attachment field called email, where a .msg file is stored for each record. Looking for code to save this contents of this field in a folder in my drive.
View 1 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
Feb 29, 2008
Hi,
I apologise in advance for my lack of understanding but I need to know whether an access 95 database will accept file name's that are 21 characters long and contain underscore's?
I have never had to get involved ith access database's so far but have been told find this out.
Any help would be much appreciated.
Thanks in advance,
Mike
View 3 Replies
View Related
Dec 9, 2004
Is there a way for a access to read the filenames of files contained in a folder on the local machine and paste
those filenames in a database field?
View 1 Replies
View Related
Mar 16, 2007
Hello All,
I ma using a .mdb file in a program and want to get the list of all tables and all the columns of the respective tables in the .mdb file.
In Oracle we use 'select * from table' for getting all the tables in the DB. But how it is done in MS-Access?
Pls help.
Regards,
View 2 Replies
View Related
Dec 19, 2006
In the lock file I noticed I can see the computer names of the people who have the db open. Is there a way to get the login names from this file so I can knock some sense in my co-workers who still have the database on
View 1 Replies
View Related
Nov 14, 2006
Hi, newbie here to this forum, been looking about for ages to try and find an access based forum.
I am not a great coder, have not really done it, nor remotely understand it, but I have still managed to write a database in access for the office.
We run a residential care home, where we had 5 databases (MS Works) which held different information of the residents within the home but duplicated name, dob, etc. I have successfully writen a access database which works well. But now I want to start pushing it a degree further if I can.
We took delivery of a HP officejet all in one printer, and it has a scanner with document feeder which we scan letters in so we can share them with head office, but what I would really like to do, is scan letters in relating to a specific client, and be able to save the file name as a link, so an other user on an other PC can open the document on their PC. Basically, I want to avoid us going to the filing cabinet to refer to a letter which was written to us.
I am using XP Home, with Office 2003 Pro, and Acrobat 8 Pro.
Any ideas where to even start looking?? I did do a search, but have no idea how to start.
Thanks in advance.
View 3 Replies
View Related
Nov 6, 2013
I'm trying to find all the table names from another database file using VB code. This is what i have so far:
Code:
Function getFileNameOpen(path) As String
Dim f As Object
Dim varFile As Variant
Set f = Application.FileDialog(3)
[Code] ....
This function will show a browser window so that the user can select a file, and returns the file path.
Code:
Function OpenFile()
Call getFileNameOpen(path)
Dim db As Database
Dim td As TableDef
Database = path
[Code] ....
I have this function. I need to get all the table names from the selected access file into a list so I can do a for loop after.
I can't figure out how to set the CurrentDb() to the path one. This code gives me the table names and some other names of stuff which I don't know what they are. But for the current database not the one in the path.
View 2 Replies
View Related