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!

Derrived Attributes

Status
Not open for further replies.

stort

Programmer
Feb 17, 2006
10
GB
I've got a table called 'Images'
and in this table i want the details about images to be stored such as;

'location','size','resolution'

'location' i'm storing as a hyperlink to the image itself, and as for 'size' and 'resolution' i would like these to be automatically populated from the file itself? can this be done? if so how? can it be done if i use OLE object as the datatype instead of a hyperlink to the image? (p.s. i'm not a VBA programmer so if it requires this could you please be very specific)

Thank you very much

Stort
 
actually, I've just had to do this for something else completely and I've used vbs to do it, maybe you can adapt the code for vba, it shouldn't require any more than trivial changes...


function GetPictureAspect(path)
set pic = LoadPicture(path)
GetPictureAspect = pic.height/pic.width
end function

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top