Saving attachments on a form using Access

Locopete99

Registered User.
Local time
Today, 15:04
Joined
Jul 11, 2016
Messages
163
Hi,

I have a form on which users can attach photos.

This is required for the users to log pictures of machine faults.

Is there a way to save these attachments using a VBA button?

I'm new to form attachments so i have no idea where to start.
 
other people would know more about this, but what version of access are you using? there's always the *attachment* field type, but I think that was eliminated in version 2010 or later. And then there's the OLE field type, which I think can accomodate this sort of thing too. And of course, there's always an option of storing the actual *hyperlink* in a text box and pointing it to a windows explorer file path.
 
Hi,

I'm using 2016 and I'm using the attachment field type.

My user wants to be able to just click a button and download any attachments to a certain file instead of 5 - 6 photos per record. This is for a fault that the user on the factory floor is reporting, so adding hyperlink is not viable and the users dont (and shouldn't) have access to the Engineers network share.
 
My user wants to be able to just click a button and download any attachments to a certain file instead of 5 - 6 photos per record.
I don't think I follow that one. what do you mean by this?
download any attachments to a certain file
download attachments to a file? an attachment *is* a file. you can't download something to itself. furthermore, what does this mean please?
instead of 5 - 6 photos per record
are you saying you have 5-6 image files stored in a single table record?
 
To try and explain

1) The customer has a machine breakdown. They use my database to report the breakdown. Additionally they can attach photos to show the break. Yes they can attach more then 1 photo per record.

2) my typo - I want to download the photos to a certain folder not file. But using VBA i want to be able to click a button and then access saves the 5-6 photos in a certain folder i.e F:\ Breakdowns\"ID NO"\"filename.extension". Instead of the engineer having to click and save 6 photos manually.

3) Yes
 
See if this helps.
 
I want to download the photos to a certain folder not file. But using VBA i want to be able to click a button and then access saves the 5-6 photos in a certain folder i.e F:\ Breakdowns\"ID NO"\"filename.extension". Instead of the engineer having to click and save 6 photos manually.
well to be honest with you man, someone that's complaining about saving 5 images to a windows directory, one at a time, is making kind of an impractical request. It doesn't take *that* long! But....none-the-less, there probably is a solution to this. Without writing the code and simulating the scenario on my end, I would only be able to give you guesses as what you need to do. Here's a starter for ya:
PHP:
//open the table's recordset
//navigate to the record you are at on your form
//point to the field and loop through the images attached there
//save them to the windows directory
If no one else offers anything here, I might be able to put something together that could do it. But that's not for certain. and now that I've seen gasman's post, you might not even need that.
 
I'm using 2016 and I'm using the attachment field type.
You should not store files in Access tables - especially photos. You will quickly reach the db size limit. I don't get why you are storing images in tables that you are then saving in file folders as well - if that's what you're doing.
 
You should not store files in Access tables - especially photos. You will quickly reach the db size limit.
I've been told many times by PHP experts to not store image files in MYSQL databases for various reasons, but rather store them in a server directory and point to them when producing dynamic content.
 
Thanks guys, I'm going to mark this as solved for now and have a chat to the user
 

Users who are viewing this thread

Back
Top Bottom