Adding in Form

Discuss the database features

Adding in Form

Postby hank80 » Sat Feb 25, 2017 10:26 am

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
hank80
 
Posts: 2
Joined: Sat Feb 25, 2017 10:20 am

Re: Adding in Form

Postby F3K Total » Sat Feb 25, 2017 2:10 pm

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 33 times
    MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
    my current system
  • Windows 7 OOo, AOO, LOLinux Mint OOo, AOO, LO
F3K Total
Volunteer
 
Posts: 903
Joined: Fri Dec 16, 2011 8:20 pm

Re: Adding in Form

Postby hank80 » Sun Feb 26, 2017 6:25 pm

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
hank80
 
Posts: 2
Joined: Sat Feb 25, 2017 10:20 am

Re: Adding in Form

Postby F3K Total » Sun Feb 26, 2017 6:47 pm

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 32 times
    MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
    my current system
  • Windows 7 OOo, AOO, LOLinux Mint OOo, AOO, LO
F3K Total
Volunteer
 
Posts: 903
Joined: Fri Dec 16, 2011 8:20 pm


Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests