picture popup madness

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Basically what I am trying to do is this:
- I have a contuous form, Employees, for employee info
- One of the fields is a bound object frame named
EmployeePhoto
- The EmployeePhoto field is filled by cutting and
pasting a jpg into the control on a form
- I want to click the photo in a given record which
will open another form, ZoomPhoto, and pass the picture
data to the newly opened form

Does anyone know how to code this?

Thanks,

Mark
 
use the onclick event of the EmployeePhoto control. code it like so:
EmployeePhoto_Click()
DoCmd.OpenForm "FormName", OpenArgs:=EmployeePhoto.picture
End Sub
now on the Open Event of the Form "FormName" code this
Form_Open()
me.PhotoField.Picture = OpenArgs
End Sub
be careful to follow the syntax fully
 
Oh a few other things reguarding the Photo control:
set the properties of the control as such and you can activate the control
and simply navigate to the picture instead of a cut and paste. It is much
cleaner:
in the properties of the control set under the data tab: OLE type allowed =
embedded
under the other tab set the auto activate = double click
A note to the wise. This is not the best way to store pictures in Access as
it consumes alot of storage space.
A better way would be to store the path in a text field to the picture and
use the on current event of the form to set the picture property of an
unbound OLE control to load the picture at run time. It saves alot of space
and does not effect performance greatly. The trade off is well worth it.
 
Thanks William for your time,
I am not able to make this work as I am getting a runtime
error 438: object does not support this property or
method.

Here are the setups:
Control in main products form is Picture1.
Form and control names for for magnification are Zoom1
and Picture1.

Here is the code:
From main form on click
DoCmd.OpenForm "Zoom1", OpenArgs: = Picture1.Picture
From secondary form on open
Me.Picture1.Picture = OpenArgs

Did I miss something?

Mark
 
Back
Top