Linking pictures to a combox (1 Viewer)

Simon_MT

Registered User.
Local time
Today, 13:19
Joined
Feb 26, 2007
Messages
2,177
Lyndon,

Here are a couple of comments:

1) It is advisable not to put lookups into tables
2) OLE objects are bitmaps and bloat your database
3) You can use Attachments but it is far more effiecient to referential access images

The database I;m upload is a tenth of the originals size.
I have attached the images for RecordID 2 and 9. I have named them 2.jpg and 9.jpg
The Rolls Royce image is aslo attached. The Rolls Royce Images will need to attached. Properties Picture.
You will need to change the GetPictureDir back to your Path.
Naming conventions particular ID have been changed.
Functions have been created rather than Subs for the Image handling.
The ImageFile Control will show an error until the 3rd Combi-box has been updated.

Simon
 

Attachments

  • Benchmarking.zip
    65.7 KB · Views: 73
  • 2.jpg
    2.jpg
    35.3 KB · Views: 68
  • 9.jpg
    9.jpg
    98.6 KB · Views: 77
  • rolls-royce.gif
    rolls-royce.gif
    8.2 KB · Views: 54

lyndonrobertson

Registered User.
Local time
Today, 05:19
Joined
Aug 30, 2012
Messages
20
Simon

thank you for your help

one question though. the model of vehicle is no longer being displayed?

just the manufacturer and a date
 

Simon_MT

Registered User.
Local time
Today, 13:19
Joined
Feb 26, 2007
Messages
2,177
Technically it would probably be better to create a Models table and combi as at the moment Cars is where the Model is whereas the Model should determine the car.

Simon
 

lyndonrobertson

Registered User.
Local time
Today, 05:19
Joined
Aug 30, 2012
Messages
20
Simon

managed to get the ID working but when i have selected the manufactuer then the year and a model it just display the name of the image not image itself
 

Simon_MT

Registered User.
Local time
Today, 13:19
Joined
Feb 26, 2007
Messages
2,177
I only found that 2 records that had images ID 2 and 9. It is not until you Update the CombiBox from Cars that the correct ID can be identified. If you get stuck you should have enough posts to upload your database or just send as previously.

Simon
 

Simon_MT

Registered User.
Local time
Today, 13:19
Joined
Feb 26, 2007
Messages
2,177
The Table Cars hold the ID relating to the Image this has to on your form before searchinfg for the corresponding image. Alternatively you may trigger the image retrieval.

Simon
 

Users who are viewing this thread

Top Bottom