Selasa, 10 Desember 2013

RE: [MS_AccessPros] OLE Objects

 

Sarah-

 

If you're using Access 2007 or later, use an Image control on your form and set the Control Source to the text field that contains the full path to the picture.  Access will load the picture for you.  If you're using an earlier version, see my LoadPictureSample.zip file in the Files / 1_Samples section of our website.

 

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

 

 

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of sarahk@schemesoftware.com
Sent: Wednesday, December 11, 2013 5:08 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] OLE Objects

 




I currently have a table with an OLE object where I store pictures or documents. These items are embedded in the table. I would like to change this and just store the path&file name in the table. Questions:

 1) do I change the picture field in the table from OLE object to text or do I leave it as OLE???

 2).Currently,  I use the following code to find and load the picture:

Private Sub picins_Click()
On Error GoTo Err_undo_Click
Dim OLEInsertObjDlg As Integer
OLEInsertObjDlg = 14
OLEBound499.Action = OLEInsertObjDlg
    If Me![picture].OLEType = acOLEEmbedded Then
        Dim OLEUpdate As Integer
         OLEUpdate = 6
        OLEBound499.Action = OLEUpdate
        Forms![registrant].Refresh
    End If
   
Err_undo_Click:
    Exit Sub
End Sub

 

How do I change the code to just save the path and file name instead of the picture. I would like to keep the 'browse' option that comes up to find the picture, so that the user can find the picture, but once the user selects the picture, i would like to save that path/file name and not the actual picture.

As usual all help is appreciated.

Thanks

Sarah




__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar