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.