473,769 Members | 6,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Import Pics from folder...

Currently we open a form and manualy place the pic in each new record.
I need someway for to give Access a folder and then have it import each
pic it finds in the folder and place the file name in the txtFilename
text box. Can access do this?

Nov 13 '05 #1
2 1692

"Josh" <jo***********@ socal.rr.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Currently we open a form and manualy place the pic in each new record.
I need someway for to give Access a folder and then have it import each
pic it finds in the folder and place the file name in the txtFilename
text box. Can access do this?


You can write VBA code to do what you want, except do you really want all
the file path and names in the same Text Box? Wouldn't it be better, since
you are in "batch mode" of operation, to write each to a separate record in
the table itself?

Check help for the Dir function for "running the folder contents". See
http://www.mvps.org/access/api/api0001.htm for code to use the Windows
Common Dialog to let the user choose the folder.

Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP
Nov 13 '05 #2

Josh wrote:
Currently we open a form and manualy place the pic in each new record. I need someway for to give Access a folder and then have it import each pic it finds in the folder and place the file name in the txtFilename
text box. Can access do this?


I would vote for going Larry's route.
If you're looking for a way to prompt the user for a filename, you
could use Ken Getz's code from access web, it's the first one in the
API section. just write that value to your field on your form.

If you have a batch of these, you could do these as a group with the
Dir function and then some more code, but it depends entirely if you're
comfortable with/good at coding in VBA.

Being lazy, I'd write code that looped through the contents of a folder
and grabbed the info I needed and wrote it to the database. But that
will only work if your situation is right...

Umm... if all the files have unique names that can be linked to unique
records, you could use the BrowseFolder API to get the folder
containing all the pics, and then loop through the contents using DIR
and then write the values to a table via a recordset. But then, if you
don't know how to do any of that stuff, it's kinda a moot point, unless
you wanted to pay someone to do it for ya.

So, to answer your question, yes, Access can do it. How well it works,
though, depends on implementation, and that will most likely require
code, either the BrowseFolder API or the OpenSaveFile API...
BrowseFolder will work better if your naming conventions are good, and
will be easier to automate a batch "import" (link to the files, do NOT
import them - your database will get HUGE very quickly! - store just
the UNC path.) If you're doing this one file at a time, just use the
OpenSaveFile API, and grab the path to your file and write it to your
DB.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5916
by: Chris | last post by:
Background: I am using a MS Access 2000 front end with SQL Server 8.0 back end. I have the requirement to import all text files (regardless of filename) from a given folder on the network into a table within SQL Server. This import needs to run continuously, as more text files will be saved in the folder by a separate system and they need to be updated into the SQL Server table. I have a DTS which can import all text files from the...
2
1458
by: harold | last post by:
hi guys, i going mad trying to create a page that has the contents of a folder down one frame (pics, in list form) and when i click one of them it opens in the opposing frame. i have it just about right eccept it shows them as thumbnails and opens in a new windows despite the target setting. any ideas?? thanks harold
4
15072
by: Jorntk | last post by:
I have css in a folder name css. so how can this .css file read a pics file from another folder eg, pics/a.jpg. Both css folder and pics folder are located in a folder named project. I know i can call the pic by url(project/pic/a.jpg) However, its very inconveninet when I change the folder name eg from project to project10.
1
1607
by: Laphan | last post by:
First of all, my apologies for the xpost. I realise the netiqute, but this query seems to cross the boundaries of both these groups. Basically I have created a small ASP site that allows a user to upload their own pics via ASPupload so that they can be used on their site. I use a very simple form with a INPUT file box to allow them to browse, select and upload the picture. I then use ASPupload to save the file, get the file params and...
1
3071
by: mirandacascade | last post by:
O/S: Windows 2K Vsn of Python: 2.4 Currently: 1) Folder structure: \workarea\ <- ElementTree files reside here \xml\ \dom\
4
2432
by: gsocks | last post by:
hello, i have a problem. i would like to import python files above and below my current directory. i'm working on /home/foo/bar/jar.py i would like to import /home/foo/car.py and /home/foo/bar/far.py
2
9234
by: john | last post by:
I have 400 different Excel-spreadsheetfiles, same structure, all with only one record in it, and all residing in the same folder. Every now and then new Excel files are being added. In my Access file I have a form and via a button on that form I would like to periodicly automatically import all of those (new) Excelfiles in an Access table with an identical structure. What's the easiest way of making such an automated import? Is this doable?...
0
2734
by: prose | last post by:
I am having a problem getting Import Project to work in my csproj file. I have a number of C# projects and I'd like to have easy control over the folder that they are built to. In other words, I want all the .exe files to be put in the same folder after the build. Additionally, I want the guy down the hall to be able to easily choose a different folder for the .exe files. I have done the following:
6
2024
by: tedpottel | last post by:
Hi, I'm trying to create my own lib of functions, but it seems like I can only import them if they are in pythons lib folder. Example I have a folder called K:\mypython Now in the interactive python shell I type
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.