Return to article: How to Insert a Picture, Graph, or Microsoft Office Document into an Access Database
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
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 WithExit_cmdOLEAuto_Click: Exit SubError_cmdOleAuto_Click: MsgBox CStr(Err) & " " & Err.Description Resume Exit_cmdOLEAuto_ClickEnd Sub
Copyright © 1999-2008 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.
Partner Sites