The answser to both questions is yes. Additionally, putting the images on a
network drive will lessen the chance of the user moving them.

Signature
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
I did both of these, but since this is an app that I am distributing to
clients form whom I do not provide any infrastructure support, I cannot
guarantee that the default file will be or stay in the default location, nor
even that their default location will be the same (assuming it will be on a
mapped drive).
Certainly, my help files will indicate that the image files should be placed
on the server so that they are accessible by the user regardless of which
workstation he chooses to use (assuming the drive mapping is consistent).
The table that contains the user profile has a field for the path/filename
to that user's image file, but the entry will be null by default and will
only be populated if the user browses for selects an image file (using the
comdlg32 API call).
On the open event of the user options form, I set the image control's
.Picture property to the filepath string from the current user's profile in
the table (if the pathname has been set). However, I still had to hard-code
the .Picture property when saving the form, because the Image control will
not remain on the form without a valid image path.
I was hoping that there would be a way embed the default image in the
database so that I could have the Image control load that one if the user
does not have one. However, it appears that the .Picture property can only be
a reference to an external image file, not to an image file embedded in the
database. I did make a workaround for those cases when neither the user's
image file or the default cannot be found (but I just don't like
workarounds, and I may not be foreseeing the time when someone manages to do
something that actually removes the control from the form because there is no
valid image file found):
-Trap & ignore the 2220 error that occurs in this case
-If the user has no image file in his profile, and if the default image file
is not found at the hard-coded location, do the following two things:
-Set the image control's .Visible property to False
-Overlay a text box (containing a note about how to link to an image file)
over the image control, and set its .Visible property to True
If a valid image file is found, vice versa both of the above.
If I am just making this too difficult, please let me know of an easier way.
I'm trying to prevent the "Just get MS Photo Editor off your Office 2000
disk" fix that I might have to try to sell to the client if I go with OLE, as
well as the file bloat that occurs from embedding pictures.
> The answser to both questions is yes. Additionally, putting the images on a
> network drive will lessen the chance of the user moving them.
[quoted text clipped - 19 lines]
> >
> > If Len(Dir(<Stored path/filename>)) = 0 Then...?
Stephen Lebans - 26 Sep 2005 04:44 GMT
A couple of methods are available:
1) Add a hidden Image control to the form in question. Load your "default
Picture" into this control. Your statement is incorrect that the Image
control cannot contain an Image without a valid/existing path. In design
view, once you select an Image via the control's Picture property, it
remains embedded.
Now whenever you want to display the defaul pic simply do something like:
Me.ThisFormsImageControl.PictureData =
Forms!NameOFtheHiddenForm.ImageControl.PictureData
or
2) Load the default pic into an Image control.
Copy the control's PictureData property to a table containing a Long Binary
field
When you want to display the default pic simply copy the contents of the
field to the PictureData prop of the desired Image control.

Signature
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
>I did both of these, but since this is an app that I am distributing to
> clients form whom I do not provide any infrastructure support, I cannot
[quoted text clipped - 83 lines]
>> >
>> > If Len(Dir(<Stored path/filename>)) = 0 Then...?
Brian - 26 Sep 2005 05:59 GMT
Thank you, Stephen. What I meant is that one cannot remove/nullify the
.Picture property because Access assumes that you are trying to remove the
control (and rightly so, I guess, since it is, after all, an image). I
noticed that once set to a valid path it is persistent, even if the file is
later removed. By either trapping the 2220 error or doing On Error Resume
Next, I can get past the error that is generated if it is linked but the file
is not found. Every time I drop into design view, however, I get a message
indicating that Access could not open the file.
That is a minor nuisance, though. I assume in your #1 that you mean to embed
the image in the hidden control so that it is available for the other one. Is
either of these two options more efficient than the other?
> A couple of methods are available:
>
[quoted text clipped - 102 lines]
> >> >
> >> > If Len(Dir(<Stored path/filename>)) = 0 Then...?
Stephen Lebans - 27 Sep 2005 02:52 GMT
I would use the hidden Image control method.

Signature
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> Thank you, Stephen. What I meant is that one cannot remove/nullify the
> .Picture property because Access assumes that you are trying to remove the
[quoted text clipped - 145 lines]
>> >> >
>> >> > If Len(Dir(<Stored path/filename>)) = 0 Then...?