Book dealer

 

This example has four forms. One is based on a single table, one uses two tables, a third uses two tables but the main table has been removed.

The fourth, called Invoice, has two main forms. One group is based on two tables with a list box to linking to a third table. The other part of the form uses a table in a grid. This form also has a search/filter box with two buttons to control the search/filter.

The invoice form is used in this way. Select a buyer from the list box, then select the books to be bought from the lower form (note the sum being updated as the books are selected), then add a post and packing charge (you need to click outside the box the trigger the update), click a button to "print" an invoice and when happy the invoice is correct click a button to write a credit transaction.

I have assumed that readers know how to create forms with the wizard.

"Book Dealer.odb" is the database. It requires macros to be loaded as follows.
Open the database then click Tools then Macros then Organise macros then OpenOffice.org Basic. In the window that displays click Organiser, then Libraries tab, then New. In the New library window type Dealer. Then click Edit. Remove the three lines that are displayed then cut and paste the contents of "Book dealer macros.txt"

There "Book Dealer database" pdf provides the background to the decisions made and instruction on how to reproduce the forms. It includes an example sale of three books.

There is a sample invoice.

The database was developed using OO 2.3.1 and SRB 1.0.2 on Windows XP. It was trialled using OO2.4.1 on Ubuntu 8.4 but not the SRB part as I have not successfully downloaded it.
It has now been tested with OO3 and SRB 1.0.5.
ċ
BookDealer.odb
(147k)
matt scot,
23 Nov 2008, 07:02
Ċ
matt scot,
23 Nov 2008, 05:37
ċ
Bookdealermacros.txt
(9k)
matt scot,
27 Nov 2008, 23:58
Ċ
matt scot,
23 Nov 2008, 05:38
Comments