Displaying Icons in a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 2K2 and WinXP

I have a file folder that contains 215 icons representing 215 country flags.
I realize that it is not a good idea to store images in a database, rather
provide a link to the image files. However, the only place the icons will be
used is on a Data Entry Form and I would like to display the flag icons as I
move from record to record.

I would like to programmatically display the icons as a condition to a
control on the form, namely; [txtCntry]. When [txtCntry] becomes, let's say,
"Botswana", then the code would retrieve the icon "Botswana.ico" from the
file folder and display it on the form. I can manually perform this function
for each record now, but there are quite a few records. Is there a way to do
it programmatically?

Any thoughts?
 
If you did embed the icons in access you could setup a tbl with the following:

CountryID (AutoNumber)
Country (Text)
Picture (OLE Object)

You could then place an OLE object on your form based on a query that looks
at the control on the form to get the country name or ID and then pull the
OLE picture for that particular country. I'm not positive, but the ico file
may need to be saved as a jpg or bmp for Access to display it. Good luck!
 
Back
Top