Hello Mathmatou, sMustapha and Derek
I same the same project for an application about wild flowers in France.
I use another solution to display informations but result is the same.
But a new flower is entered on another form.
On the same form, I placed a grid listing all items of table flowers and beside a panell
with all fields of the table (including photos of flower and leaf)
Here a piece of my code to display infos I do that because I have many tables joined) :
procedure Accueil_TableGrid1_OnCellClick (Sender: string; ACol, ARow: Integer);
Var s : String;
begin
Accueil.DBImage1.LoadFromDatabase('fleurs', 'photo', Accueil.TableGrid1.dbItemID);
s := SQLExecute('SELECT Familles.Famille from Fleurs left outer join Familles on Fleurs.id_Familles = Familles.id where Fleurs.id = '+ IntToStr(Accueil.TableGrid1.dbItemID));
Accueil.Label5.Caption := 'Famille : ' + s;
s := SQLExecute('SELECT Couleurs.Couleur from Fleurs left outer join Couleurs on Fleurs.id_Couleurs = Couleurs.id where Fleurs.id = '+ IntToStr(Accueil.TableGrid1.dbItemID));
Accueil.Label6.Caption := 'Couleur : ' + s;.....
and so on (there 28 fields)
And I do same thing behind
procedure Accueil_TableGrid1_OnKeyDown (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
procedure Accueil_TableGrid1_OnKeyUp (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
with a DoubleBuffered to avoid flicker in the image change.
With Delphi, all is possible
JB