Re Libre Bsea

I use Libre Base to keep all of my personal financial record.
I make a niumber of regular monthly contributions to various organisations. Is there any way I can automatically enter them all at the beginning of the financial year. Our financial year runs for 1st July to 30th June.

Regards

Peter Goggin

Hi Peter,

I make a niumber of regular monthly contributions to various
organisations. Is there any way I can automatically enter them all
at the beginning of the financial year. Our financial year runs for
1st July to 30th June.

Two different ways:

1. You have two different forms, mainform and subform. In mainform the
first contribution must be marked. All fields of the mainform and the
subform are the same. But the automatic value for the primary-key and
the date for the contribution have to differ. So link the mainform to
the subform for all fields except the primarykey and the date. Now you
could set a new date for any new row in the subform. Works without
makros, but you have to do this 11 times for a whole year.

2. You have to read the content of the mainform by makro:

SUB PeriodicalContribution
DIM aYear()
oFormStart = thisComponent.Drawpage.Forms.getByName("mainform")
oFormZiel = thisComponent.Drawpage.Forms.getByName("subform")
st1 = oFormStart.getString(1)
st2 = oFormStart.getString(2)
...
aYear = array("08/17","09/17","10/17","11/17" ...)
FOR i = LBound(aYear()) TO UBound(aYear())
oFormZiel.moveToInsertRow()
oFormZiel.updateString(1,st1)
oFormZiel.updateString(2,st2)
...
oFormZiel.insertRow()
NEXT
END SUB

There must be an array for a loop. Could be you find a better way to
create it as created above (could read the year from the mainform and
create the parts of the array by this).

Regards

Robert
- --
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3