Embedding image in a form, pls help forum noob... (1 Viewer)

connie

Registered User.
Local time
Today, 08:02
Joined
Aug 6, 2009
Messages
92
Hi,

I have designed a form that is being used on two completely different networks with no ability to have common folders. I put two logos in the header, but the images can only be read on the network with which the database was created.

I've looked up info on this and tried storing an OLE object in a table as Microsoft suggests, but then it repeats the picture for every record and that's not what I need...I just need these two images to be able to travel with the form header, unchanging (and on the reports too if possible).

Any help would be GREATLY appreciated.

Thanks!
 

John Big Booty

AWF VIP
Local time
Today, 22:02
Joined
Aug 29, 2005
Messages
8,263
You could put a copy of your image in a folder in the same folder/location that your DB is running from and use something like;

Code:
Me.ImageName.Picture = Application.CurrentProject.path & "\FolderName\ImageName.jpg"
 

connie

Registered User.
Local time
Today, 08:02
Joined
Aug 6, 2009
Messages
92
You could put a copy of your image in a folder in the same folder/location that your DB is running from and use something like;

Code:
Me.ImageName.Picture = Application.CurrentProject.path & "\FolderName\ImageName.jpg"

Well, that's the problem: The same database will be used on two different networks that cannot access one another's folders, but written using the same code. One is on an X drive and the other is on an H drive, and the X drive users don't have access to the H drive and vice versa. So I was hoping for a way to write the logos into the actual form somehow so that they can travel with it. Is that possible?
 

Endre

Registered User.
Local time
Today, 14:02
Joined
Jul 16, 2009
Messages
137
Why not just use an Unbound Object placed directly in the Header of your form/report only. And Do not Link it, so it will embedded - Your App size will increase a little now you have the image embedded though.
 

connie

Registered User.
Local time
Today, 08:02
Joined
Aug 6, 2009
Messages
92
The Picture Type was set as Embedded so I thought that it was, but then it wouldn't let me remove the path under "Picture." Turns out I had originally inserted it as a Picture, so when I went back in and deleted them and put in two new Unbound Object Frames, I was able to paste the images into those Unbound frames and now they travel with the form from network to network.

So thank you so much Endre for your help!! :)
 

John Big Booty

AWF VIP
Local time
Today, 22:02
Joined
Aug 29, 2005
Messages
8,263
Well, that's the problem: The same database will be used on two different networks that cannot access one another's folders, but written using the same code. One is on an X drive and the other is on an H drive, and the X drive users don't have access to the H drive and vice versa. So I was hoping for a way to write the logos into the actual form somehow so that they can travel with it. Is that possible?

If these are two different instances of Access, then the objection you have raised does not exist, so long as the images are in a folder on the same path/drive that access is running from. The code I provided above will determine the location of Access and then be able to locate your images. I suggest you revisit my suggestion.
 

connie

Registered User.
Local time
Today, 08:02
Joined
Aug 6, 2009
Messages
92
If these are two different instances of Access, then the objection you have raised does not exist, so long as the images are in a folder on the same path/drive that access is running from. The code I provided above will determine the location of Access and then be able to locate your images. I suggest you revisit my suggestion.

They are two duplicate databases running on completely different networks with no common folders, paths, or drives whatsoever. Otherwise, yes, your suggestion would've been great. The embedded OLE Object worked for this situation. Thanks!
 

Endre

Registered User.
Local time
Today, 14:02
Joined
Jul 16, 2009
Messages
137
John's solution will still work - the reference is related only to the application folder. No mention of drive letters etc, so, as he says it will work fine.
 

connie

Registered User.
Local time
Today, 08:02
Joined
Aug 6, 2009
Messages
92
You're both right...I read that so many times and still didn't get it. Now I get it. I'm an idiot. :eek:
 

Users who are viewing this thread

Top Bottom