Displaying Icons in a Form

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?
 
G

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top