473,468 Members | 1,328 Online
Bytes | Software Development & Data Engineering Community
Create 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 1665

"Josh" <jo***********@socal.rr.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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
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...
2
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...
4
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...
1
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...
1
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
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...
2
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...
0
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...
6
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.