Wednesday, May 2, 2012

MS Access Key From Image

I wanted to share an additional option to my earlier blog regarding Sharepoint Attachments.  This design shows the flexibility that can be built into an MS Access Web Database.

Here it is:

In my web database (as described in my blog "MS Access SharePoint Attachment Field):

Add CLIENT forms that have an unbound Image Control, place TIF images in a consistent folder on the users computer (I would automate the daily image distribution).

Run my custom PopulateImages() function that adds the image names to a field in the table.

In the OnCurrent event of the form, set the unbound image control's "Picture" to the image.

As my tables are still Sharepoint lists, I still have the administrative advantages of a web database. This is more reasonable for higher daily volumes (remember it took and hour to add 150 images to the attachment field). It also gives the advantage of distributing any updates to users automatically whenever they login. Users can use the free MS Access 2010 runtime. Either browser based or client based can be available from the same application.

Private Sub Form_Current()
Dim MImage
MImage = "C:\folder\NewImages\" & Me.ImageName
Me.ImageNew.Picture = MImage
End Sub

What do you think?

0 comments: