photos out of access

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

Hi All

discovered today that you can't export an access report with photos to any
"useable" medium - by useable i mean i need to export the pictures so that i
can generate ID cards from them. I've tried Stephen Leben's reports utility
and although i ended up with the pictures in Word i couldn't "get" to them.

So, i was wondering if there is a way just to access a number of pictures
via a query or code and export these directly to a folder. What i want to
do is run a query to extract the people that i want the photos of and then
just export the photos from their current location (they are linked rather
than embedded) to a new folder. If anyone has any ideas on how to achieve
this, or if it is even possible, i would be grateful for the feedback.

Cheers
JulieD
 
Hi Duane

yes, although i'm open to suggestions as to what the easiest way to go is.
The database is used to store staff information. These staff are used at
different events. The events require the staff to have photo ids issued
only for that event. So the purpose of the report is to list the staff who
are scheduled to be working at the event - name / position / employee number
etc and provide the photographs so that the accreditation service can create
the photo ids.

So a report that we produced in access had everything we wanted (employee
details with photos so you could see who was who) ... when we 'published' it
with word, we lost the photos - which meant that we have to get the
appropriate photos out some way. We're talking a staff database of 500
people and maybe 20 of these will work at a large event. So i'm open to any
suggestions that could make this easy.

Cheers
JulieD
 
I guess I need to know why Word and not just Access reports?
Are you storing the path to the pictures? If so, you could use the same
query as your report's record source with code like the following. You would
need to change some syntax to meet your needs.

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strFolder as String
strFolder = "C:\MyFolder\EventPictures\"
Set db = CurrentDb
Set rs=db.OpenRecordset("ReportRecordSourceHere")
With rs
Do Until .EOF
CopyFile .Fields("PictureLocationFieldHere"), strFolder &
..Fields("PictureLocationFieldHere")
.MoveNext
Loop
.Close
End With
Set rs = Nothing
Set db=Nothing
 
Hi Duane

thanks for this, will give it a go tomorrow and let you know the result.

Regards
JulieD
 
Back
Top