Adding in Form

Discuss the database features
Post Reply
hank80
Posts: 2
Joined: Sat Feb 25, 2017 10:20 am

Adding in Form

Post 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
OpenOffice 4.1.1 on Windows 10
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Adding in Form

Post 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
Attachments
checkboxInvoice.odb
(13.26 KiB) Downloaded 100 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
hank80
Posts: 2
Joined: Sat Feb 25, 2017 10:20 am

Re: Adding in Form

Post 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.
OpenOffice 4.1.1 on Windows 10
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Adding in Form

Post 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.
Attachments
ListfieldInvoice.odb
(17.57 KiB) Downloaded 92 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Post Reply