Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Location of Button Images

Status
Not open for further replies.

debot54

Programmer
May 19, 2001
12
0
0
US
I have had no problem adding images to my command buttons. They work great, that is as long as nothing changes. In particular I am talking about the location of the images themselves - I am using cutom images. Anyway, as I said things were fine until the DB had to be moved. Now the button images no longer reside in the location when I added them to my buttons. Other than locating all buttons that are using images and manually fixing the path to their new locations, what can be done to fix (and prevent) this problem? As I don't really need the images, I am simply ready to remove all of the images from the buttons and be done with the problem. Anybody have any ideas?
 
Why not copy and paste the images onto your form as OLE objects and code them with the code from your buttons? This will greatly increase file size above what you would see with ordinary buttons, though.

You might just want to get rid of them.

Tom

Born once die twice; born twice die once.
 
Is there a reason why you can't place copies of the graphics files in the same directory as your db?

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Easiest thing to do would be to set the PictureType property of the button to "Embedded".
 
How are ya debot54 . . .

In parallel with [blue]missinglinq[/blue] [purple]a central location[/purple] for the DB and picture files is your 1st order of business.

Since [purple]every machine has a C: drive[/purple] this is a good place to lock the secenario down. Typical common directory structure for all my DB's is:

C:\Database\DB_FolderName\DB_Name.mdb
C:\Database\DB_FolderName\Pictures\FileNames.???

With the above [blue]transferring the DB & pictures to another machine is no problemo![/blue] . . . Bear in mind for each DB you can add files & folders for whatever you deem necessary.

Also note, if you move [blue]C:\Database\DB_FolderName[/blue] to another drive (including subFolders), its easy enough in VBA to seek out all command buttons and simply change the drive letter in the [blue]Picture[/blue] property.

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top