Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display multiple attachments in microsoft access 2010 forms and reports

I was initially very pleased to discover the attachment field in Access 2010. It's a feature that aesthetically irks my inner database purist but my inner lazy sod is in charge here and it does look, on the face of it, like it could make one of my current projects much easier/simpler. Happily it displays pictures/icons automatically on the forms and reports but (why is there always a but eh!) it only displays the first one and I need it to display all of them.

You can of course scroll through the attachments one at a time but I'm pretty sure my client won't wear that, despite his request that I complete the project in MS-Access which, seemingly, only has very rudimentary built in options for display :/ BUT...

I may well be wrong, I've got almost no MS-Access experience. My coding background is firmly LAMP stack and web so I'm deeply ignorant of what's on offer in the Windows/Access ecosystem. I suspect there are excellent 3rd party reporting tools that give very flexible layout but I need to see all the attachments on the form, not just the reports.

So, blundering blindly into the void my initial strategy is this...

Create a separate table for attachments where each field is an "attachment" containing a single item only. Then use scripting in the forms and reports to...

  1. Query that table for all attachments belonging to the record in question
  2. Display/Format those fields as some sort of list
  3. Dynamically append a fresh attachment field to the end of that list so the user has somewhere to upload a next attachment
  4. Make the form page refresh whenever an attachment is added so there's aways a free one.

So, my questions are...

  1. Is what I describe feasible in Access?
  2. Am I missing a much simpler / better / canonical solution?
  3. How powerful is Access's scripting language(s) with reference to display? i.e clunky or pixel perfect?
  4. It's not still Visual Basic is it? (noooooo! ;)
  5. If so are there any other scripting languages I can use within forms/reports?

Sorry, I know it's a bit of a long wooly question but I'm a fish out of water here!

Thanks,

Roger

like image 907
Roger Heathcote Avatar asked Feb 19 '23 04:02

Roger Heathcote


1 Answers

Let us say I have a table with an attachment:

attachment table

Let us say that I have three images in one of those attachment fields that I wish to display. I can create a query:

attachment query

After which I can create a continuous form:

attachment form

like image 158
Fionnuala Avatar answered Apr 30 '23 06:04

Fionnuala