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 |