SavePicture Command Problems

chrisdedobb

Registered User.
Local time
Yesterday, 17:32
Joined
Nov 4, 2004
Messages
16
I am not sure what I am doing wrong.

I have loaded up a sample DB that has a table with an OLE Object and a form that displays the Bitmap in an outbound OLE Object field.

On that form, there is a button that does the following:

Private Sub Command2_Click()

Dim strPath As String
Dim strID As String

strID = Me!ID

strPath = "c:\ERRSCRN_" & strID & ".bmp"
MsgBox (strPath)

SavePicture tblErrorScreenShots.scrn1.Picture, strPath ' << IT CRASHED HERE WHEN I DEBUGGED

End Sub

I get the following Error Message. I have no Idea what to do. Please Help!

Run-time error '438':
Object doesn't support this property or method
 

Attachments

I advise you to store the link to the graphic, not the file since it will quickly bloat your db and compacting it will not help.

This might help you grab the file location... Browse [Find a directory or file]

Searching the forum is a great way to discover and learn the answers to your Access programming questions.
 
Thanks for the advise but that is exactly what I am trying to do. What the purpose of this form is supposed to do is:

1: Person opens the form.
2: Pastes a screenshot into the field.
3: Clicks button and the db saves the contents of the OLE Object to a file on my hard-drive.

This way I can display graphics by the file reference. The DB loaded here as an example, is just a sample DB that I can share and it does store the bitmap to the DB. However the DB that I actually need to use this in just has a form with a Outbound OLE Object field that is not storing to any table.

Does anyone have any Ideas on how I might be able to accomplish what I need to do?
 

Users who are viewing this thread

Back
Top Bottom