dbTalk Databases Forums  

pull down lists and images

comp.database.ms-access comp.database.ms-access


Discuss pull down lists and images in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sushila bakhda
 
Posts: n/a

Default pull down lists and images - 10-19-2004 , 08:16 AM







i have a pull down list bound to a lookup table of students and wish to
display the image of the student each time a name is selected. i'd
prefer to do this not using SQL server but creatinga text file with a
UNC path to the image on the server.

if anybody could point me to a decent tutorial on the above it would be
much appreciated.

many thanks - sue

Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: pull down lists and images - 10-19-2004 , 09:18 AM






Hi:
A text file is a bad idea.

The following is the simplest way to do this.

Create a table with a field called Name and a field called Pict.
In the Pict field put the full path of the picture (e.g.
D:\Tove\PICT0125.JPG)

Create a form. Put a combo box on the form based on the table.
Pick the name and picture fields as the data in the combo box.
Make the width of the picture field 0. Make the value of the combo
box the picture field. (all of this can be done in the wizard). Lets
assume that the name of the combo box is combo1.

Create an image box. Assume it is Image1
It will ask you for the name of a picture. Put in the path to a logo
picture or something like that.

One more step.

In the "on change" event of the combo box put in one line of code:
Me.Image1.Picture = Combo1.Value

When you open the form the logo picture will appear.
Drop down the combo and pick a name and the associated picture will
appear.

In youre case you can just add the picture field to the student table.

If you don't want to make the value of the combo box the picture
field, then you can use:
Me.Image1.Picture = Combo1.column(1)
(note that the the index is 1 less then the field position. Picture
is the second field in the combo).

There are more elaborate ways of doing this, but this works.

Good Luck

Ira Solomon

On Tue, 19 Oct 2004 21:16:24 +0800, sushila bakhda
<sushila556 (AT) hotmail (DOT) com> wrote:

Quote:
i have a pull down list bound to a lookup table of students and wish to
display the image of the student each time a name is selected. i'd
prefer to do this not using SQL server but creatinga text file with a
UNC path to the image on the server.

if anybody could point me to a decent tutorial on the above it would be
much appreciated.

many thanks - sue


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.