Adding files to attachment field via query (1 Viewer)

sooner1ksn

New member
Local time
Today, 16:37
Joined
Dec 16, 2010
Messages
2
I have a table that is created by reading a list of file names from a folder, with these fields:

FileID (an autonumber created when the table was created)
FName - the name of the file (.jpg images)
FPath - the path to the file (not including the name)
DateCreated - the creation date of the file.

I have developed a query that parses these fields and using information obtained thus (from the path and file name I gather info needed in my table) can be used to create a new table. However, as the final step, I wish to create an attachment field and attach the .jpg image to the appropriate record (one record for each .jpg).

I have found several samples of VBA code to attach things to records, but I can't find anything that will allow me to do what I want to do (via a query, which means write a function that can be used as the value for the field in the make table query). What I want to do is using a function, concatenate the path and file name for each record, and add the .jpg to an attachment field from that information.

Is this possible?
 

sooner1ksn

New member
Local time
Today, 16:37
Joined
Dec 16, 2010
Messages
2
More information...

The files in question are .jpg photos, and they are named in a format (Year taken, month taken, general subject matter, main person in the picture) which tells me at a high level what the picture is of. The intent of my db app is to pull all that information into the db (there are literally thousands of pictures) create a table that has all the information separated into fields, and allow me to sort and query all the photos by various methods. My intent in adding the images as attachments is to allow me to view the photos from within the db app, which will not necessarily be on the computer where the pictures are. So what I'm trying to do is take the information that I import, which includes the path to the file, and create that table.
 

antoniocc

New member
Local time
Today, 22:37
Joined
May 13, 2012
Messages
7
Hi - did you solve this issue?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:37
Joined
Oct 29, 2018
Messages
21,476
Hi - did you solve this issue?
I'm not sure using a query is a good idea, even if it may be possible. If it's an UPDATE query, it may not even be possible due to a potential write conflict. Just a thought...
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:37
Joined
Sep 21, 2011
Messages
14,317
12 year old thread? and those two posts are all they posted. :(

Start your own thread.
 

Users who are viewing this thread

Top Bottom