1) Basics about a form
2) Using the tablecontrol / grid control.
Form
I will try to explain the idea of forms in OpenOffice.org. Understanding the idea of forms is realy important when you want work with OOo.
You have also to understand that the word "form" does have two meanings:
- a) the writer document
b) what you see in the form navigator
When you have open the form in this way you can easy switch between edit mode and not edit mode.
When you have made a form by the wizard then most control are grouped. When you want select a single control then press the control key on your keyboard and select with the mouse a control with left clicking.
For more information see your help file. I think it is important to read your help file there it has a lot of detailed information.
Toolbars
OOo-base does have four toolbars.
- a) Form Navigation Bar
b) Form Controls
c) Form Design
d) More Controls
The toolbar More Controls is (de)-activate with a button in the toolbar where the button for the listbox also is.
When you not have study these controls don't start with base. You can only make or change forms when you can handle this.
Some tools you have to understand and can be activate with button on these toolbars.
Form Navigator
Howto open the form navigator and make it visible
On one of the tool bars there is a buttom with this you can make it visible. In the form navigator you see all elements of your form. The form navigator is an other tool than the navigator
Add Field
Is easy in combination with the form navigator for adding control to your form.
Wizard
You can switch on the wizard for listboxes, comboboxes gridcontrols and some more.
Howto make a new mainform and subforms
The form navigator acts like the explorer in windows. When you want make a new form select the place where you want have it. Right click and select new. You can not choose for a subform or main form. A main form is all what is the first level subforms are below. This means also you can have more then one mainform in your form document.
An important difference between a mainform and a subform is that a subform has always master and slave fields on the property tabpage. With this master and slave fields you can select data in the subform.
Relations and Mainforms to Subforms
For understanding relations study a tutorial about database design. But relations in a database have no meaning for how you organize your form document. Also they are not important for mainform and subform. Important for a mainform- subform is only the master-slave fields.
Editing Controls
All the controls have several properties. These are divide in three different tabpages.
a) General
b) Data
c) Events
Not all control have all tabpages. The data tabpage is only available for controls which can be bound to a record.
When you have made a form by the wizard then most control are grouped. When you want select a single control then press the control key on your keyboard and select with the mouse a control with left clicking.
Button control
On the general tabpage of this control you assign different action to this button. You have to change one value there: Action
listbox and Combobox
When you have litle experience then activate the wizard for making a listbox.
Gridcontrols
A grid is a control who contain other control but it is not a form.
You can add listboxes and comboxes to a grid control but the wizard is not working. The properties from the control inside a table control can differ a little of the same control outside a table control in a form.
I make a listbox somewhere in the form and copy some values to the listbox in the table control, and delete the listbox.
I think the name is table control and for programming we use more gridcontrol. Don't ask why.
more Gridcontrols for tables
When you have more table in your form then you need for each table a main form or sub form. In that form you can use a table. In other words when you have four different table who you want display in gridcontrols then you have also to make four (main/sub) forms.
SQL
In a form you can only use queries who give a result set. You can not insert data in other tables. When you need this queries then you have to use the SQL tool.
Writer
There forms are writer documents you must also understand how writer is working.
Filtering with example
A tutorial made by Arineckaig Here you can find a good explanation about the filters in a form. Also there is an example. I think this must be read when you want make more difficult forms.
http://dl.dropbox.com/u/10552709/FilterExamples.zip
Designing a database
This database tutorial is a detailed introduction how to design a database. You can learn you how to make relation in a database.
Links for SQL
When you want do more with forms and special with SQL read this. It is a little difficult but it can help you to understand what you can do with forms and OOo-base.
http://www.dbbm.fiocruz.br/class/Lectur ... qltut.html
http://www.h2database.com/html/grammar.html
http://wiki.services.openoffice.org/wik ... _Functions
links for OOo
Here you can find tutorials for the complete OOo suite.
https://wiki.openoffice.org/wiki/Documentation
Link for getting started with Base.
http://wiki.services.openoffice.org/w/i ... thBase.pdf
links for OOo-base and forms
http://wiki.services.openoffice.org/wiki/Database
http://openoffice.org/projects/document ... ctory/Base
When you want use macro then you have to read this. But I strongly advice try to do it without macros.
Links when you want start with macros
Next link is the site of Benitez
http://www.baseprogramming.com/resources.html
Introduction for BASIC and the API
http://wiki.services.openoffice.org/wik ... ASIC_Guide