Topic: Affichage table

Hello, I would like to know: when I click on a photo in a tablegrid I would like it to appear immediately in my form1, what is the procedure?
Thank you

Bonjour, je voudrais savoir : lorsque je clique sur une photo dans une grille je souhaite qu'elle apparaisse immédiatement dans mon formulaire1, quelle est la marche à suivre ?
Merci

Rahan57

Rahan57

Re: Affichage table

Maybe something like this?

Post's attachments

Attachment icon rahan_img.zip 624.23 kb, 199 downloads since 2021-08-06 

brian

Re: Affichage table

It's exactly that. thanks a lot
Good evening to you.
Rahan57

C'est exactement ça. Merci beaucoup
Bonne soirée a vous.

Rahan57

4 (edited by Rahan57 2021-09-03 17:35:16)

Re: Affichage table

Hi everyone, I made two table that records electric meter readings but I cannot find the solution to display the corresponding results. There is an error somewhere but I cannot find it.
If anyone could look at my attachment.
Thank you

Rahan57

Post's attachments

Attachment icon Compteur électrique.zip 339.91 kb, 192 downloads since 2021-09-03 

Rahan57

Re: Affichage table

Amazing calculations in the script for
frmCompteur_Button1_OnClick
and
frmCompteur_Button2_OnClick.
Are you sure everything is correct there?
What do you want to calculate?

6 (edited by Rahan57 2021-09-04 06:21:22)

Re: Affichage table

The first table is good but it is the second which poses a problem because the calculation is not correct. I want it to display the price of the consumption in kWh of the statement of the stay.
If you want to make it simple, you can.

Rahan57

Re: Affichage table

You have not answered the question of how to count, the difference of which values and what to multiply by.
I think you wanted to do so.
1. Delete the sqlite.db file in the folder project
2. Replace

procedure frmCompteur_Button1_OnClick
...
else
frmCompteur.edTotalRelevé.Value := frmCompteur.edRelevéDépart.Value - frmCompteur.edRelevéArrivé.Value;
...

3. Replace

procedure frmCompteur_Button2_OnClick
...
else
frmCompteur.edTotalPrixEuros.Value := frmCompteur.edTotalRelevé.Value * frmCompteur.edPrixkWh.Value;
...

4. Run

Re: Affichage table

I would like to find the price of the stay by multiplying by the price per kWh which must be displayed in the red box.

Post's attachments

Attachment icon Compteur.jpg 84.35 kb, 71 downloads since 2021-09-04 

Rahan57

9 (edited by sparrow 2021-09-04 11:15:02)

Re: Affichage table

OK
http://myvisualdatabase.com/forum/viewt … 027#p42027
I wrote above what needs to be done.

Re: Affichage table

I just tried your solution and ...... it works. Thank you, Sparrow.
Good continuation

Rahan57