Question Show a picture for the actual record.

frimbas

New member
Joined
Jan 19, 2010
Messages
1
Programming Experience
Beginner
Hi!
I have a access database connected to a project in Visual Basic Express 2008.
This is a database for items I have.
And my problems are:
I my database, when I change reccord from one item to another, I try to have a picturebox to display acutal picture for the item.

Dim NKnr As ????
If NKnr = txtNKnr Then
picFrimerke.Image = System.Drawing.Image.FromFile("C:\Program Files\FrimBas\nknrpic\"txtNKnr".jpg")

My idea was, the walue in "txtNKnr" referer to a picture with the same name in given folder.
 
You can do it in many ways:

One of the easy way is;

->Assign a new name to the image same as your primary key of the item.
->When you load that item into you’re form load the respected image into you’re picturebox by referring the item’s primary key.
 
Back
Top