[AccessD] set the DefaultPicture of an unbound image control to an attachment in a recordset field?

William Benson (VBACreations.Com) vbacreations at gmail.com
Fri May 31 16:06:52 CDT 2013


Dan

I read that thread and even tried out one poster's IconTest.Zip. It purports
to affect the database window, I think that went out with v. 12.0.

After loading it, fixing some coding errors, I noticed that what it tries to
do with form titles is lost if the database is set up to show tabbed
documents.

Actually, I am not sure showing a database in tabbed documents view is such
a good idea anyway, although during development it can be convenient.

I am content having icons in my form headers, it presents the logos well as
Herbert suggested.

What HAUNTS me and I am sure will bite me some time in the immediate future
is that I am using up a VALUABLE piece of form real estate - namely, the
header - to present static information which generally might be better used
to show aggregates and form commands.

We shall see. Oh well, my technique will evolve over time, just playing for
now.

Still gotta dig into shared icons...


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Friday, May 31, 2013 2:50 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] set the DefaultPicture of an unbound image control to
an attachment in a recordset field?

Ah Hah!  I've never used an attachment field.  Keeps the tables smaller.

An alternative might be to add your icon into the title bar of the forms.
This link provides some code (which I haven't tested).
http://www.access-programmers.co.uk/forums/showthread.php?t=123449

Thanks!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson
(VBACreations.Com)
Sent: Friday, May 31, 2013 1:17 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] set the DefaultPicture of an unbound image control to
an attachment in a recordset field?

No, Dan, it is an attachment. In fact an .ico file I built from clipart and
attached to the table where it is being held in an attachment field. The
code I presented that I am currently using sorta made that clear, or so I
had thought. Sorry if not.

    rsPic.Fields("FileData").SaveToFile SOME_PATH 
    imgApplicationIcon.DefaultPicture = SOME_PATH


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Friday, May 31, 2013 2:02 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] set the DefaultPicture of an unbound image control to
an attachment in a recordset field?

Hi William,

When you say an attachment, do you mean a .bmp file where the full path to
that file is listed in a field in your table?

If so, that's just 
    
    imgControl.Picture = rst!FileFullPath

HTH,
Dan


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list