Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing bulk graphics into to DB 1

Status
Not open for further replies.

madvalpreston

Technical User
Apr 7, 2011
142
GB
Hi
I found an Access database that let you point to a directory (in a form) where you graphic files were kept ad upload them all at once. I lost the file and I cannot find it on the web. So

1. Does anyone know of a sample database out there that does this..
2. if not any ideas how I can do this, the pictures will be part of a data input form (pictures need to be viewed whilst putting data in), and then we need to report the data and print or email the report.Thanks


 
madvalpreston,

I can promise you this is definitely not what I meant about checking the other forums in thread702-1646697.

What I meant was that if you're looking to download a full database solution, you're not asking technical questions.. and as such, it doesn't really belong here in the forums.

If you want to try and build one, or ask for assistance in that regard, then this is the place to ask. And THEN, as you run into questions, each question type should be posted in the appropriate forum... Questions about Queries and SQL in Access posted to the queries forum... Automation/vba posted to the Modules/VBA forum... Form questions to the Forms forum... Reporting questions to the Reports forum, and so on... Anything else you can't think of which forum it'd fit in would fit in this one.

However, I don't really see asking for a full database solution as a technical question.
 
How do you want to handle your graphics? That determines the solution.
1)Link to files in an external folder
2)Embed as attachments
3)Or (god forbid) embed as OLE

I have posted solutions recently for the first two, to include working demos. The third option is extremely complicated and just dumb anyways because of bloat.

This versions uses a link to a files in an external folder:

See thread 702-1643093 for discussion on this issue.
 
This discussion shows how to read all the attachments associated to a record, and then send them as emails.
thread705-1645879

Using this code, and the code discussed in Thread702-1643093 (and the demo) you could reverse the process to read all the files in a folder and store them in an attachement field. I discuss the dao readfromfile method.
 
Hi

What I want to do, and I am not sure how to apporoach it is import the links from a directory.

So if I have a form then I want it to browse for the folder and then click import.

I want to view the pictures so if there are 10 picstures in the floder I want each one to populate a table with the links.
When I clck through the 10 records I see each picture as i go along.

I will check out the links given.

Thanks

 
The demo database does pretty much exactly what you describe. For the demo you need 2007 or later.
 
Hi Majp

I have got the demo downloaded and it is very close to what we need. However, ideally we would like to have each picture shown in a record of its own, basically we do surveys and take picutres of buildings and each image always as different data against it.

Do you think this could be acheived by using a sperate form amd use the ID and parent ID, so if we have 10 iamges and this is for one survey, but we need to enter different data against each image and then run a report with the images and details.

Also can it bring in other images , like pdf, or tiff etc..... it appears only to bring in Jpeg.

But thanks it is very close to what we require
 
The code/design already does that. The picture table is a single record for each image. My parent table becomes your survey table, just add additional fields. Then each image from a folder gets associated to the parent survey. If there is additional information unique to an image add more fields to the picture table.

If you post the table and fields names for the survey and for the image I can modify the code for demo purposes. Provide the info like this (names are notional). Include primary keys and foreign keys and datatypes

tblSurvey
SurveyID (primary key autoNumber)
SurveyName (text)
SurveyDescription (memo)
SurveyLocation (text)
SurveyDate (date)
....
other survey unique fields

tblPictures
pictureID (primary Key autonumber)
SurveyID_fk (FK relates picture to a survey)
pictureName (text)
PictureDescription (Memo)
PictureDate (date)
....
other picture unique fields

I may have sent an old demo, but It will handle most image types.
 
Hi Majp

Wow the new version works very well and imports all document types we use.

So I need to build some survey tables etc.... ready for the data input against each picture which may take me some time.

Is it ok to contact you when I have these ready, I will no doubt need some help.

many many thanks for your assistance so far....
 
Reply to this post with any questions and I will get it. The code is very reuseable with each function performing a single activity, but may be a little hard to understand since there are no comments. How proficient are you in vba? This will help determine how much explanation you may need.

Even without detail knowledge of vba the code will just require some name changes to match your field and table names, the rest is generic enough to get reused.
 
Hi

I am not to good at VBA, but can usually find my way around the coding to make simple changes. I will use this thread.

thanks again
 

[purple]
MajP, good stuff! *[/purple]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
One thing I am working on is fixing the file selector. I demoed this with a folder browser. That is not that useable because you cannot see what is in the folder. I have the code to allow the file browser to be multiselect. This would be more standard, like adding attachments in outlook. You then can browse to a folder and either pick a file, hold shift key, or hold ctrl key to select files.
 
Hi majP

That would be very interesting about the multiselct in the folder.

We also are looking at the ability to attach emails to certain parts of the order structure, for example if we receive a PO from a customer then we attach this to the order process so we can see it and perhaps forward it back to them.

Thanks
 
Hi MajP

Thanks for the new version I will take a good look at it.

I have a question note quite to do with this posting and I will add a new one if you prefer.

I ahve created a quotation process and the quote could be 1 of 4 types with different wording in the document for which type it is. I ahve created a form for the user to enter whatever data for the quote that is needed and the report looks at the quote type.

Thats works, but sometimes the logo may need to change that shows on the front cover. Do you know if there is a way I can add this into the form (jpeg) so it stores in the table and I can then set the logo to the field on the report, and also put a browse button on the form so if they want to point to another logo they can do this. Then the new logo would show on the report.

Any advice would be appreciated, thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top