Page 1 of 1

Adding in Form

Posted: Sat Feb 25, 2017 10:26 am
by hank80
I have a made a form in which I can check boxes which products a client ordered. Now, I need Base to add up the total value of the checked checkboxes by itself and display the total sum in the field 'tota'l'. How do I do this?

Example:

checkbox PRODUCT A ($50) - checked
checkbox PRODUCT B ($70)
checkbox PRODUCT C ($10) - ckecked

TOTAL $60

Re: Adding in Form

Posted: Sat Feb 25, 2017 2:10 pm
by F3K Total
Hello,
in my point of view, complete wrong approach, because the query and form have to be redesigned, each time a product is added or deleted, but possible, see attached sample.
R

Re: Adding in Form

Posted: Sun Feb 26, 2017 6:25 pm
by hank80
Thanks F3K Total, this looks great! I am not a very experienced user, so I am curious te know what the right approach is in your point of view. What can I do better? Thanks again.

Re: Adding in Form

Posted: Sun Feb 26, 2017 6:47 pm
by F3K Total
try the attached version, it has an extra table TBL_INVOICE_PRODUCTS to keep the invoice items. They can be added with a listbox in a gridcontrol.
The amount of products will be used in the calculation, and current date will be set, if you store a new invoice.