Picture Link

  • Thread starter Thread starter ChoonBoy
  • Start date Start date
C

ChoonBoy

Appreciate some help here and thanks in advance.

I link my pictures to the following folders

C:\Documents and Settings\MyName\Desktop\Picture.jpg
C:\Documents and Settings\MyName\My Documents\Picture.bmp

My code:
If Me!pic1a = "X" Then
Forms!startpg!fmpPic!Img.Picture = ""
Else
Forms!startpg!fmpPic!Img.Picture = Me!pic1a
End If

It works on my PC but when I copied the program to another PC, it does not
work.

This is because of "MyName" and the other PC has a different name. Is there
a way to ignore "MyName" for any PCs

Regards
 
ChoonBoy said:
Appreciate some help here and thanks in advance.

I link my pictures to the following folders

C:\Documents and Settings\MyName\Desktop\Picture.jpg
C:\Documents and Settings\MyName\My Documents\Picture.bmp

My code:
If Me!pic1a = "X" Then
Forms!startpg!fmpPic!Img.Picture = ""
Else
Forms!startpg!fmpPic!Img.Picture = Me!pic1a
End If

It works on my PC but when I copied the program to another PC, it does not
work.

This is because of "MyName" and the other PC has a different name. Is
there
a way to ignore "MyName" for any PCs

Regards


There's code to retrieve the location of these and other folders at the
following URL ...

http://www.mvps.org/access/api/api0054.htm

It's a lot of code, but you just need to copy and paste it into a standard
module. Once you've done that, calling the code is easy ...

? fgetspecialfolderlocation(csidl_personal)
C:\Users\Brendan Reynolds\Documents
? fgetspecialfolderlocation(csidl_desktopdirectory)
C:\Users\Brendan Reynolds\Desktop
 
Back
Top