Comments on: How to Insert a Picture, Graph, or Microsoft Office Document into an Access Database

2 Comments From eHow Members

Return to article: How to Insert a Picture, Graph, or Microsoft Office Document into an Access Database

docsharp76

docsharp76 said

Flag This Comment

on 6/4/2008 Great blog with lots of useful information and excellent commentary! Thanks for sharing.

http://www.1-satellite-tv-facts.com/Direct-TV.html
http://www.1-satellite-tv-facts.com/Dish-Network.html
http://www.1-satellite-tv-facts.com/Satellite-Radio.html
http://www.1-satellite-tv-facts.com/T1-Internet-Service.html
http://www.1-satellite-tv-facts.com/Satellite-DSL.html
http://www.1-satellite-tv-facts.com/Satellite-Internet.html
http://www.1-satellite-tv-facts.com/VoIP.html
http://www.1-satellite-tv-facts.com/Phone-Systems.html
http://www.1-satellite-tv-facts.com/Affiliate-Programs.html

Anonymous

Anonymous said

Flag This Comment

on 12/27/2007 This code will automate your Bound Object Field with the simple click of a button. All you have to do is make sure the picture name ("12345.bmp") is the same as the unique identifier. This helps with the process of implementing a different picture for every record. Like a member program, this will hold the picture of your corresponding record. This is very clean, and it works very well. You can manipulate this code to work with any kind of object.

Code:

Private Sub cmdOleAuto_Click()
On Error GoTo Error_cmdOleAuto_Click
With Me![OLEMempic]
.Enabled = True
.Locked = False
' Specify what kind of object can appear in the field.
.OLETypeAllowed = acOLELinked
' Class statement--optional for Excel worksheet.
.Class = ".bmp"
' Specify the file to be linked.
' Type the correct path name.
'C:\\Casey's Stuff\\Photos\\DB Photo Shots\\ApprenticeNumber
.SourceDoc = "C:\\\\" & Me![UniqueNumber] & ".bmp"
' Range statement--optional for Excel worksheet.
.SourceItem = ""
' Create the linked object.
.Action = acOLECreateLink
' Optional size adjustment.
.SizeMode = acOLESizeStretch
End With
Exit_cmdOLEAuto_Click:
Exit Sub
Error_cmdOleAuto_Click:
MsgBox CStr(Err) & " " & Err.Description
Resume Exit_cmdOLEAuto_Click

End Sub

Return to article: How to Insert a Picture, Graph, or Microsoft Office Document into an Access Database

Related Ads